PHP 5 Quiz # 2

Quiz: PHP 5 Quiz # 2
Total Questions: 30 MCQs
Time: 30 Minutes


  • 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 # 2
Question 1 of 30
  • The ______ keyword is used to indicate an incomplete class or method, which must be further extended and/or implemented in order to be used.

  • Which of the following responsible for generates the backtrace

  • Which of the following is not a boolean false

  • $a = &$b; $b = 'Mary?' print $a;

  • In mail($param1, $param2, $param3, $param4), the $param2 contains:

  • What is the best way to URL encode a string?

  • You start a transaction with PDO::beginTransaction(). How do you roll back a transaction?

  • Assuming today is March 10th, 2001, 5:16:18 pm, and that we are in the Mountain Standard Time (MST) Time Zone, which of the follow outputs: March 10, 2001, 5:16 pm

  • You start a transaction with PDO::beginTransaction(). How do you commit a transaction?

  • function foobar( ) { $a = func_get_args( ); return $a[2]; } print foobar('a',1,'b',2); What would the output be?

  • ( (4 >= 4 && 8 < 1) || (44 == 33 || 5 > 3) ) will return

  • Which of the following functions split the string and return the array?

  • True or false? PHP provides the goto in the latest version.

  • Which of these functions will not result in a runtime error if the file requested does not exist or can't be opened?

  • How do you make PHP use a class file without having to require or include it manually?

  • What visibility level will this class property get in PHP5? var $cool = true;

  • What will the following code output: "lemon", "a"=>"orange", "b"=>"banana", "c"=>"apple"); ksort($fruits); foreach ($fruits as $key => $val) { echo "$key = $val\n"; } ?>

  • How do you connect mysql with the use of PHP5 new functions?

  • What is the difference between $message and $$message?

  • The _______ method will be called automatically when an object is represented as a string.

  • $text = 'He went to the school.'; echo strpbrk($text, 'w'); In the above code, what is the output?

  • $array = []; Is coorect in php version

  • Which subversion of PHP5 adds short array syntax?

  • If the method is an abstract, class must be:

  • What is the primary difference between a method declared as static and a normal method?

  • What is the name of default class for all classes

  • How to install pecl extensions?

  • Which PCRE regular expression will match the string

  • What will be output of this statement echo substr("Think Different",6);

  • What is not a PHP type?