PHP 5 Quiz # 6

Instructions
Quiz: PHP 5 Quiz # 6
Total Questions: 30 MCQs
Time: 30 Minutes

Note

  • Do not refresh the page while taking the test.
  • Results along with correct answers will be shown at the end of the test.
PHP 5 Quiz # 6
Question 1 of 30
00:00
  • Using strpos what is the position of "t" in $var $var = "take that";

  • mysql_connect( ) does not take following parameter

  • Which datatype does not supported by PHP?

  • PHP 5 Format => local time/date as integer

  • Which function is used for counting element from an array.

  • You want to add a new line of text to existing file, what do you use? $data = 'some text'

  • How to add the elements 'banana' and 'apple' to the following array? $stack = array('orange', 'lemon');

  • $var = "string" ; echo "A text with a $var." ; What output will be?

  • What will be the values of $a and $b after the code below is executed? Explain your answer. $a = '1'; $b = &$a; $b = '2$b';

  • What is the output of the following code?

  • if(a==b) { echo '1'; } else { echo '2'; } can be replaced with?

  • Which function discard the contents of the output buffer?

  • What is the inherit key?

  • The default value of register_globals in PHP is:

  • Join() and Implode() are the same ?

  • What will $x be equal to after the statement $x = 3 + "15%" + "$25"?

  • What will be the output of the following code? $j=30; $k=0; $k=$j++/$i++; echo $i . ” ” . $j . ” ” . $k . ” “;

  • Consider the following code:$string = 'Question test.'; $find = 'Q'; $pos = strpos($string, $find);if ($pos == false) echo 'No correspondence.'; else echo 'The caracter is find.';

  • What is the truth about the "implode" method?

  • How do you retrieve the user's IP address

  • For PHP version <= 5.3, how can we activate error reporting for all levels??

  • How do you access the GET request parameter 'foo'?

  • What is the difference between characters \034 and \x34?

  • Which array syntax is incorrect?

  • Is it possible to extend the execution time of a php script?

  • What is the out-put of the following code?

  • $a = fread($x); fclose($x); What is the correct syntax to initialize a handle to read from standard input?

  • How to use try/catch block in php ?

  • Considerer this code : $var = 1; function &blah() { global $var; $var++; return $var; } $num = &blah(); $num = &blah(); blah(); What is the value of $num ?

  • What's the result of the following code? echo count('');