Logo educatepk.com
MCQs & Books free for all subjects and educational help  
Subscribe email alerts:
MCQs Online
MCQs on PHP General
Books
MCQs on PHP General
All php mcq are available here.
Option image

Q No.1 of 10

When a file is included the code it contains, behave for variable scope of the line on which the include occurs
Option 1
Any variable available at that line in the calling file will be available within the called file from that point
Option 2
Any variable available at that line in the calling file will not be available within the called file
Option 3
Variables are local in both called and calling files
Option 4
Non of these
Q No.2 of 10

The difference between include() and require()
Option 1
is include() produced a Fatal Error while require results in a Warning
Option 2
both are same in every aspects
Option 3
are different how they handle failure
Option 4
Non of these
Q No.3 of 10

A variable $abc is set to “HELLO WORLD”, which of the following script returns in title case
Option 1
echo ucfirst(strtolower($abc)
Option 2
echo ucfirst($abc)
Option 3
echo ucwords(strtolower($abc)
Option 4
echo ucwords($abc)
Q No.4 of 10

When you need to obtain the ASCII value of a character which of the following function you apply in PHP?
Option 1
val( );
Option 2
ord( );
Option 3
asc( );
Option 4
chr( );
Q No.5 of 10

What does this function do: <?php function my_func($variable) {return (is_numeric($variable) && $variable % 2 == 0);}?>
Option 1
) tests whether $variable is an even number
Option 2
tests whether $variable is a number and ends in 2
Option 3
tests whether $variable ends in 2
Option 4
tests whether $variable is a number and contains 2
Q No.6 of 10

What does break; do in PHP?
Option 1
Moves on to the next iteration of the current for, foreach, while, do-while or switch structure
Option 2
Ends execution of the current switch structure
Option 3
Ends execution of the current for, foreach, while, do-while or switch structure
Option 4
Not use in php
Q No.7 of 10

What library do you need in order to process images?
Option 1
GIF/PNG library
Option 2
GD library
Option 3
c-client library
Option 4
Image Library
Q No.8 of 10

Which one of these variables has an illegal name in PHP?
Option 1
$myVar
Option 2
$my_Var
Option 3
$my-Var
Option 4
Non of these
Q No.9 of 10

PHP can be run on Microsoft Windows IIS(Internet Information Server?
Option 1
True
Option 2
False
Q No.10 of 10

Which of the following delimiting method is known as string Interpolation?


Option 1

delimited by double quote


Option 2

delimited by single quote


Option 3

delimited by <<< identifier


Option 4

All of these



Correct Answers