Time remaining
:
:
Test Status
PHPRANDOMTEST
Ques 1 :
Which of the following mode of fopen() function opens a file only for writing. If a file with that name does not exist, attempts to create anew file. If the file exist, place the file pointer at the end of the file after all other data.
(A) W
(B) W+
(C) A
(D) A+
Ques 2 :
what will be the output of below code ?
$x="101.5degrees";
(double)$x;
(int)$x;
echo (string)$x;
?>
(A) 101.5
(B) degrees
(C) 101
(D) 101.5degrees
Ques 3 :
Which of the following PCRE regular expressions best matches the string php|architect?
(A) \d{3}\|\d{8}
(B) [a-z][a-z][a-z]\|\w{9}
(C) [az]{3}\|[az]{9}
(D) .*
Ques 4 :
Which of the following function is used to pick one or more random values from PHP Array?
(A) Random_array()
(B) array_random()
(C) Rand_array()
(D) array_rand()
Ques 5 :
How do you get information from a form that is submitted using the "get" method?
(A) $_GET[];
(B) Request.Form;
(C) Request.Query String;
(D) .$_POST[];
Ques 6 :
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 7 :
Which of following variable assignment is 'by value' assignment in PHP
(A) $value1= $value?
(B) $value1= & $value?
(C) $value1= & $value?
(D) None
Ques 8 :
Which of the following delimiting method is known as string Interpolation
(A) delimited by single quote
(B) delimited by double quote
(C) delimited by <<< identifier
(D) All of above
Ques 9 :
Which of following commenting is supported by Php.
(A) Shell syntax - #
(B) Multiline Comment /* ------------- */
(C) Both of above
(D) None of above
Ques 10 :
In php string data are
(A) delimited by single quote
(B) delimited by double quote
(C) delimited by <<< identifier
(D) All of above
Ques 11 :
Trace the false statement
(A) Because the included code will be embedded in a PHP execution block, the PHP execution block, the PHP escape tags ( aren't required on the file to be includeD.
(B) Any code found within an included file will inherit the variable scope of the location of its caller
(C) For the inclusion of remote files the allow-url-pope must be enabled ad URL wrapper must be supported
(D) Including a file produces the same result as copying the data from the file specified into the location in which the statement appears.
Ques 12 :
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 13 :
PHP code is embedded directly into XHTML document?
(A) False
(B) True
Ques 14 :
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 15 :
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 16 :
Identify the variable scope that is not supported by PHP
(A) Local variables
(B) Function parameters
(C) Global variables
(D) Hidden variables
Ques 17 :
When compared to the compiled program, scripts run
(A) Slower
(B) Faster
(C) The execution speed is similar
(D) All of above
Ques 18 :
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 19 :
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)
Ques 20 :
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{}
Submit Answer
Don't Refresh the Page !! ...