PHP Programming Quiz


Play this quiz that will help you to excel in PHP certification exams, placements etc. This PHP programming quiz consist of 10 questions that you need to solve in 10 minutes. We’ve specially designed this quiz so that you can quickly acquaint to the pattern of questions you can be asked in placement drives, certification exams etc. This PHP programming test enables you to assess your knowledge of PHP programming.

Take the Free Practice Test



PHP MCQs

Practice PHP MCQ Questions, which will help you to clear your PHP Programming related concepts and also helps you to prepare for placements, technical rounds, interviews, competitive exams etc.

PHP Quiz

Try Free PHP Quiz, to start a quiz you need to login first, after login you will get start quiz button and then by clicking on that you can start quiz. You will get 10 Minutes to answer all questions.

PHP Quiz

1. As compared to associative arrays vector arrays are much

Faster
Slower
Stable
None of the above

2. What will be the output of the following PHP code ?

<?php
$i = 0;
$j = 0;
first: while ($i < 2)
{
 $i++;
  while ($j < 3)
    {
     $j++;               
      echo("loop
");
      if($j%2==0)
         continue;
      goto first;
    }
}
?>

prints "loop" infinite times
prints "loop" 1 times
prints "loop" 2 times
prints "loop" 3 times

3. How many methods are available for the exception class?

five
six
seven
eight

4. Which of the following function is Used to set the array pointer to the value of last key?

last()
end()
next()
final()

5. Which of the following is the latest version of php?

7.1
7.2
7.3
7.4

6. Which of the following expression matches any string containing at least one p?

p*
p-
p^
p+

7. Variable names in PHP must start with ?

letter
underscore
no numbers
All of the above

8. PHP offers functions specific to ________ sets of regular expression functions

1
2
3
4

9. Close the file with fclose() function.

Yes
No
Can be yes or no
Can not say

10. How many error levels are available in PHP?

14
15
16
17

Results