Google News
logo
PHP - Quiz(MCQ)
1 .
Which of the following type specifier is invalid in print f() functions ?
A)
% b
B)
% a 
C)
% z
D)
% d

Correct Answer : Option (B) :  

% a

2 .
PHP Variable start with which symbol?
A)
$
B)
!
C)
*
D)
#

Correct Answer : Option (A) :  

$

3 .
The PHP syntax is most similar to:
A)
JavaScript
B)
VBScript
C)
Perl and C 
D)
jQuery

Correct Answer : Option (C) :  

Perl and C 

4 .
What is the correct way to include the file "header.inc" ?
A)
<!-- include file="header.inc" -->
B)
<?php include:"header.inc"; ?>
C)
<?php include file="header.inc"; ?>
D)
<?php include "header.inc"; ?>

Correct Answer : Option (D) :  

<?php include "header.inc"; ?>

5 .
In PHP which of following is the difference between include() and require() ?
A)
Both are same in every aspects
B)
Are different how they handle failure
C)
Is include() produced a Fatal Error while require results in a Warning
D)
None of the above

Correct Answer : Option (B) :  

Are different how they handle failure 

6 .
To process image what library needed in PHP?
A)
imageProcess
B)
imageCreator
C)
GD Library 
D)
PNG Library

Correct Answer : Option (C) :  

GD Library 

7 .
In PHP, which of the following function is used to insert content of one php file into another php file before server executes ?
A)
#include()
B)
include[]
C)
include()
D)
#include{}

Correct Answer : Option (C) :  

include() 

8 .
Which of the following function is used to redirect a page ?
A)
header()
B)
redirect()
C)
reflect()
D)
None of the above.

Correct Answer : Option (A) :  

header()

9 .
PHP variables are_____ ?
A)
Single type variable
B)
Multitype variables 
C)
Double type variables 
D)
Trible type variables

Correct Answer : Option (B) :  

Multitype variables

10 .
How can we check the value of a given variable is a number?
A)
numeric()
B)
number()
C)
is_number()
D)
is_numeric()

Correct Answer : Option (D) :  

is_numeric()