Time remaining
:
:
Test Status
PHPRANDOMTEST
Ques 1 :
PHP code is embedded directly into XHTML document?
(A) False
(B) True
Ques 2 :
Which of the
following
are valid float values?
(A) 4.5678
(B) 4.0
(C) 7e4
(D) All of above
Ques 3 :
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 4 :
Is php can support multiple inheritance?
(A) NO
(B) YES
Ques 5 :
Casting operator introduced in PHP 6 is?
(A) int64
(B) array
(C) object
(D) real or double or float
Ques 6 :
what will the ouptut of below date() function ?
<?php
$date="2009-5-19";
$time="14:31:38";
$datetime=$date.$time;
echo date("Y-m-d:H:i:s",strtotime($datetime));
?>
(A) 2009-5-19:14:31:38
(B) 19-5-2009:2:31:38
(C) 2009-5-19:2:31:38
(D) 19/5/2009:14:31:38
Ques 7 :
What is the out put
<?php
$x=array(4,2,5,1,4,5,3,4);
$y=array_count_values($x);
echo count($y);
?>
(A) 8
(B) 7
(C) 5
(D) 28
Ques 8 :
Identify the variable scope that is not supported by PHP
(A) Local variables
(B) Function parameters
(C) Global variables
(D) Hidden variables
Ques 9 :
mysql_connect( ) does not take following parameter.
(A) database name
(B) database host
(C) user ID
(D) password
Ques 10 :
Which of the following method is suitable when you need to send larger form submissions?
(A) Get
(B) Post
(C) Both Get and Post
(D) There is no direct way for larger form. You need to store them in a file and retrieve
Ques 11 :
When defining identifier in PHP you should remember that
(A) Identifier are case sensitive. So $result is different than $ result
(B) Identifiers can be any length
(C) Both of above
(D) None of above
Ques 12 :
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 13 :
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 14 :
All variables in PHP start with which symbol?
(A) !
(B) $
(C) &
(D) %
Ques 15 :
Which operator is used to concatenate two strings in php?
(A) dot operator (.)
(B) plus operator (+)
Ques 16 :
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 17 :
PHP is a widely used �����. scripting language that is especially suited for web development and can be embedded into html.
(A) Open source general purpose
(B) Open source special purpose
(C) Proprietary special purpose
(D) Proprietary general purpose
Ques 18 :
The left associative dot operator (.) is used in PHP for
(A) multiplication
(B) separate object and its member
(C) concatenation
(D) delimiter
Ques 19 :
The output of following script would be
$somerar=15;
function ad it () {
GLOBAL $somevar;
$somerar++ ;
echo "somerar is $somerar";
}
addit ();
(A) somerar is 1
(B) somerar is 15
(C) somerar is 16
(D) somerar is $ somerar
Ques 20 :
What's the best way to copy a file from within a piece of PHP?
(A) Print 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)
Submit Answer
Don't Refresh the Page !! ...