Time remaining
:
:
Test Status
PHPTEST3
Ques 1 :
Assume that your php file 'index.php' in location c:/apache/htdocs/phptutor/index.php. If you used $_SERVER['PHP_SELF'] function in your page, then what is the return value of this function ?
(A) phptutor/index.php
(B) /phptutor/index.php
(C) c:/apache/htdocs/phptutor/index.php
(D) index.php
Ques 2 :
In PHP, which of the following function is used to insert content of one php file into another php file before server executes it .
(A) include[]
(B) #include()
(C) include()
(D) #include{}
Ques 3 :
Which operator is used to concatenate two strings in php?
(A) plus operator (+)
(B) dot operator (.)
Ques 4 :
What is the output ?
Assume that today is 2009-5-19:2:45:32 pm <?php $today = date("F j, Y, g:i a"); ?>
(A) may 19,09,2:45:32 PM
(B) May 19, 2009, 2:45 pm
(C) May 19,2009,14:45:32 pm
(D) May 19,2009,14:45:32 PM
Ques 5 :
Are there regular expressions in PHP?
(A) Yes - regular expressions use Perl-like conventions
(B) Yes - PHP supports two different types of regular expressions: POSIX-extended and Perl-Compatible Regular Expressions (PCRE).
(C) Yes - regular expressions use the POSIX standard
(D) No - PHP uses "glob" style matching only
Ques 6 :
What function used to print statement in PHP?
(A) echo();
(B) printf
(C) ""
Ques 7 :
Which of the following function is used for terminate the script execution in PHP?
(A) break()
(B) quit()
(C) die()
Ques 8 :
What is the output ?
<?php $arr = array(5 => 1, 12 => 2);
$arr[] = 56;
$arr["x"] = 42;
unset($arr);
echo var_dump($arr); ?>
(A) 56
(B) x=42
(C) 42
(D) Null
Ques 9 :
What is the output ?
<?php define("x","5"); $x=x+10; echo x; ?>
(A) 10
(B) 5
(C) Error
(D) 15
Ques 10 :
PHP variables are_____ ?
(A) Multitype variables
(B) Single type variable
(C) Double type variables
(D) Trible type variables
Ques 11 :
Is php can support multiple inheritance?
(A) NO
(B) YES
Ques 12 :
Which of these statements is true?
(A) PHP interfaces to the MySQL database,and you should transfer any data in Oracle or Sybase to MySQL if you want to use PHP on the data.
(B) PHP interfaces to a number of relational databases such as MySQL, Oracle and Sybase. A wrapper layer is provided so that code written for one database can easily be transferred to another if you later switch your database engine.
(C) PHP interfaces to a number of relational databases such as MySQL, Oracle and Sybase but the interface differs in each case.
(D) There's little code in PHP to help you interface to databases, but there's no reason why you can't write such code if you want to.
Ques 13 :
How would you add 1 to the variable $count?
(A) incr count;
(B) $count++;
(C) $count =+1
(D) incr $count;
Ques 14 :
what is the return value of this substr function?
<?php
$rest = substr("abcdef", -1);
$rest = substr("abcdef", 0, -1);
?>
(A) f,abcde
(B) b,abcdef
(C) a,fedcb
(D) a,abcde
Ques 15 :
Which of the following is used to check if a function has already been defined?
(A) bool function_exists(functionname)
(B) bool func_exist(functioname)
(C) bool f_exists(functionname)
Ques 16 :
Assume that your php file 'index.php' in location c:/apache/htdocs/phptutor/index.php. If you used basename($_SERVER['PHP_SELF']) function in your page, then what is the return value of this function ?
(A) phptutor
(B) phptutor/index.php
(C) index.php
(D) /index.php
Ques 17 :
<?php
$x="display";
${$x.'_result'} ();
? >
Above program will call the function display_result()
(A) False
(B) True
(C) Parser Error
(D) None of the above
Ques 18 :
Father of PHP?
(A) Larry Wall
(B) Rasmus Lerdorf
(C) James Gosling
(D) Guido Van Rossum
Ques 19 :
All variables in PHP start with which symbol?
(A) !
(B) $
(C) &
(D) %
Ques 20 :
In PHP the error control operator is _______ ?
(A) .
(B) *
(C) @
(D) &
Submit Answer
Don't Refresh the Page !! ...