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 - Guess the output pf the PHP code? <?php "Hello World" ?>

Show Answer
 Answer is : Option C

Q 2 - Guess the output of the following PHP code? <?php $x = 0; if ($x++) print "PHP"; else print "Python"; ?>

Show Answer
 Answer is : Option B

Q 3 - Select the correct output of the code snippet <?php $num = 1; $num1 = 2; print $num . "+". $num1; ?>

Show Answer
 Answer is : Option D

Q 4 - Mention the function in PHP to find ASCII value of a character?

Show Answer
 Answer is : Option D

Q 5 - select the proper way to create an array in PHP? 1) arr[0] = "programming"; 2) $arr[] = array("programming"); 3) $arr[0] = "programming"; 4) $arr = array("programming");

Show Answer
 Answer is : Option C

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

Show Answer
 Answer is : Option C

Q 7 - select the correct output or the PHP code <?php $x = "I"; $y = "Like"; $z = "Programming"; $x .= $y .= $z ; echo $x; ?>

Show Answer
 Answer is : Option A

Q 8 - Guess the output of the PHP program? <?php $color = "Red"; $var = $color[1]; echo "$var"; ?>

Show Answer
 Answer is : Option A

Q 9 - Select the function in PHP that helps to compress strings

Show Answer
 Answer is : Option C

Q 10 - How can we automate the classes inclusion in PHP?

Show Answer
 Answer is : Option C