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. Which of the following is the output of the below code?

<?php 
  
echo strpos("Hello letsfindcourse!", "lets"), " \n"; 
    
?>

4
5
6
7

2. Which in-built function will add a value to the end of an array?

array_unshift()
into_array()
inend_array()
array_push()

3. Which of the below symbol is a newline character?

\r
\n
/r
/n

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. Which of the following is not specialized keywords in exception handling.

try
catch
throw
this

6. What is the use of is_array() function?

Function is used to print the array in readable format.
Adds elements to the beginning of the array and returns the size of array.
Function can be used to verify if a variable is an array. Returns TRUE or FALSE
Adds elements to the end of the array and returns the size of array.

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

<?php
$arr = array('0' => "Letsfindcourse", 
             '1' => "Computer",  
             '2' => "Science", 
             '3' => "Portal"); 

print_r($arr[0]); 
?>

Portal
Letsfindcourse
Error
No Output

8. The term PHP is an acronym for PHP:_______________.

Hypertext Preprocessor
Hypertext multiprocessor
Hypertext markup Preprocessor
Hypertune Preprocessor

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

<?php 
  
if(TRUE) 
    echo "This condition is TRUE"; 
if(FALSE) 
    echo "This condition is not TRUE"; 
?>

This condition is TRUE
This condition is not TRUE
No Output
Error

10. Which one of the following functions is used to determine whether a class exists?

exist()
exist_class()
class_exist()
__exist()

Results