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. What will be the output of the following PHP code?

<?php 
   $url = "lfc123456@example.com";
   echo ltrim(strstr($url, "@"),"@");
?>

lfc123456@example.com
lfc123456
lfc123456@
example.com

2. There is no need to write a dollar sign ($) before a constant

TRUE
FALSE
Can be true or false
Can not say

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

<?php
$a = 1;
$b = 2;
$c = 3;
echo ($a % ($b) + $c);
?>

2
3
4
5

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

<?php
echo 'This is  "letsfindcourse"' ;
?>

This is letsfindcourse
This is "letsfindcourse"
Error
No Output

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

<?php
$x = 3.3;
$y = 2;
echo $x % $y;
?>

1.3
1
0
Error

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

<?php
$x = 8;
$y = 8.0;
echo ($x === $y);
?>

8 === 8
No Output
1
0

7. Which of the following is type of operators in PHP?

Arithmetic Operators
Comparison Operators
Assignment Operators
All of the above

8. What is gettype() function do?

gettype() function returns the type of the variable
gettype() function is used to set type to variable
gettype() function is used to change type to variable
None of the above

9. The class from which the child class inherits is called
(i) Child class
(ii) Parent class
(iii) Super class
(iv) Base class

Only (i)
(ii), (iii) and (iv)
Only (iii)
(ii) and (iv)

10. do-while loop is an _____ control loop ?

exit
exist
easy
entry

Results