Tutorial Study Image

PHP Online Quiz

Following quiz provides Multiple Choice Questions (MCQs) related to PHP . You will have to read all the given answers and click over the correct answer. If you are not sure about the answer then you can check the answer using Show Answer button. You can use Next Quiz button to check new set of questions in the quiz.


Q 1 - which is correct for a function in PHP?

Show Answer
 Answer is : Option D

Q 2 - Name the function to get the memory usage in PHP?

Show Answer
 Answer is : Option C

Q 3 - select the correct output of the PHP code? <?php echo chr(52); ?>

Show Answer
 Answer is : Option C

Q 4 - suggest the correct output of the following code in PHP? <?php $x; if ($x) print "hi" ; else print "hello"; ?>

Show Answer
 Answer is : Option B

Q 5 - select the correct output for the PHP code? <?php $x = 3.3; $y = 2; echo $x % $y; ?>

Show Answer
 Answer is : Option B

Q 6 - When did the Try/catch error handling introduced in PHP?

Show Answer
 Answer is : Option C

Q 7 - Select the proper function of isset() function in PHP?

Show Answer
 Answer is : Option A

Q 8 - Select the right function to search a character in a string in PHP?

Show Answer
 Answer is : Option C

Q 9 - Guess the output of the following PHP code? <?php $var1 = 1; print($var1); print $var1; ?>

Show Answer
 Answer is : Option C

Q 10 - What will be the output of the switch statement in PHP? <?php $a = "1"; switch ($a) { case 1: print "C programming"; case 2: print "R programming"; default: print "Machine learning"; } ?>

Show Answer
 Answer is : Option D