Time remaining
:
:
Test Status
PHPRANDOMTEST
Ques 1 :
In mail($param1, $param2, $param3, $param4), the $param2 contains
(A) The message
(B) The header
(C) The recipient
(D) The subject
Ques 2 :
Php supports all four different ways of delimiting. In this context identify the false statement.
(A) You can use any of the delimiting style
(B) You can use any delimiting style but must use a single style consistently for a page
(C) You can use different delimiting styles in same page
(D) Variables declared in previous blocks are remembered on later blocks too!
Ques 3 :
What is the out put.
<?php
$x=array("aaa","ttt","www","ttt","yyy","tttt");
$y=array_count_values($x);
echo $y[ttt];
?>
(A) 2
(B) 3
(C) 1
(D) 4
Ques 4 :
What is the out put
<?php
$father="mother";
$mother="son";
echo $$father;
?>
(A) son
(B) mother
(C) motherson
(D) error
Ques 5 :
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 6 :
What's the best way to copy a file from within a piece of PHP?
(A) out a message asking your user to "telnet" in to the server and copy the file for you
(B) Open the input and output files, and use read() and write() to copy the data block by block until read() returns a zero
(C) Use the built in copy() function
(D) Use "exec" to run an operating system command such as cp (Unix, Linux) or copy (Windows)
Ques 7 :
What is the out put.
<?php
$qpt = 'Eat to live, but not live to eat';
echo preg_match("/^to/", $qpt);
?>
(A) 0
(B) 1
(C) to
(D) Null
Ques 8 :
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 9 :
Which of the following is not a session function?
(A) session_destroy
(B) session_decode
(C) session_id
(D) session_pw
Ques 10 :
What happens if you add a string to an integer using the + operator?
(A) The interpreter outputs a type mismatch error
(B) The string is converted to a number and added to the integer
(C) The string is discarded and the integer is preserved
(D) The integer and string are concatenated together in a new string
Ques 11 :
On failure of which statement the script execution stops displaying error/warning message?
(A) reinclude ()
(B) require ()
(C) both of above
(D) None of above
Ques 12 :
Which of the following is not true?
(A) PHP makes a website dynamic.
(B) PHP can be used to develop web applications.
(C) PHP applications can not be compiled.
(D) PHP can not be embedded into html.
Ques 13 :
The PHP syntax is most similar to
(A) PERL and C
(B) Java script
(C) VB Script
(D) Visual Basic
Ques 14 :
Trace the odd data type?
(A) floats
(B) integer
(C) doubles
(D) Real number
Ques 15 :
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 16 :
Which of the following functions can be used to convert the binary data stored in a string into its hexadecimal representation?
(A) encode_hex()
(B) pack()
(C) hex2bin()
(D) bin2hex()
Ques 17 :
what will be the output of below code ?
<?php
$qpt = 'QualityPointTechnologies';
echo preg_match("/^Quality/", $qpt);
?>
(A) 0
(B) 1
(C) Quality
(D) Null
Ques 18 :
The left association operator % is used in PHP for
(A) modulus
(B) percentage
(C) bitwise
(D) division
Ques 19 :
Trace the function that does continue the script execution even if the file inclusion fails
(A) include ()
(B) require ()
(C) both of above
(D) None of above
Ques 20 :
Which of the following function is used for terminate the script execution in PHP?
(A) break()
(B) quit()
(C) die()
Submit Answer
Don't Refresh the Page !! ...