What does PHP stand for?
1. Personal Home Page
2. Hypertext Preprocessor
3. Pretext Hypertext Processor
4. Preprocessor Home Page
A. Both 1 and 3
B. Both 2 and 4
C. Only 2
D. Both 1 and 2
Select an option to see the answer and solution.
PHP files have a default file extension of_______.
Select an option to see the answer and solution.
Which of the following is/are a PHP code editor?
1. Notepad
2. Notepad++
3. Adobe Dreamweaver
4. PDT
A. Only 4
B. All of the mentioned
C. 1, 2 and 3
D. Only 3
Select an option to see the answer and solution.
Which of the following must be installed on your computer so as to run PHP script?
1. Adobe Dreamweaver
2. PHP
3. Apache
4. IIS
A. All of the mentioned.
B. Only 2
C. 2 and 3
D. 2, 3 and 4
Select an option to see the answer and solution.
Which version of PHP introduced Try/catch Exception?
A. PHP 4
B. PHP 5
C. PHP 5.3
D. PHP 6
Select an option to see the answer and solution.
We can use _________ to comment a single line?
1. /?
2. //
3. #
4. /* */
A. Only 2
B. 1, 3 and 4
C. 2, 3 and 4
D. Both 2 and 4
Select an option to see the answer and solution.
Which of the following php statement/statements will store 111 in variable num?
1. int $num = 111;
2. int mum = 111;
3. $num = 111;
4. 111 = $num;
A. Both 1 and 2
B. All of the mentioned
C. Only 3
D. Only 1
Select an option to see the answer and solution.
What will be the output of the following php code?
<?php
$num = 1 ;
$num1 = 2 ;
print n u m < s p an c l a ss = " p − b l u e " > . < / s p an >< s p an c l a ss = " p − r e d " > " + " < / s p an >< s p an c l a ss = " p − b l u e " > . < / s p an > num1;
?>
Select an option to see the answer and solution.
What will be the output of the following php code?
<?php
$num = "1" ;
$num1 = "2" ;
print n u m < s p an c l a ss = " p − b l u e " > + < / s p an > num1;
?>
Select an option to see the answer and solution.
Which of following variables can be assigned a value to it?
1. $3hello
2. $_hello
3. $this
4. $This
A. All of the mentioned
B. Only 2
C. 2, 3 and 4
D. 2 and 4
Select an option to see the answer and solution.
What will be the output of the following code?
<?php
$foo = 'Bob' ;
bar <span class="p-blue">= &</span> foo;
ba r < s p an c l a ss = " p − b l u e " >=< / s p an >< s p an c l a ss = " p − r e d " > " M y nam e i s bar";
echo $bar;
echo $foo;
?>
A. Error
B. My name is BobBob
C. My name is BobMy name is Bob
D. My name is Bob Bob
Select an option to see the answer and solution.
Which of the following PHP statements will output Hello World on the screen?
1. echo (“Hello World”);
2. print (“Hello World”);
3. printf (“Hello World”);
4. sprintf (“Hello World”);
A. 1 and 2
B. 1, 2 and 3
C. All of the mentioned
D. 1, 2 and 4
Select an option to see the answer and solution.
What will be the output of the following PHP code?
<?php
$color = "maroon" ;
v a r < s p an c l a ss = " p − b l u e " >=< / s p an > color[ 2 ] ;
echo "$var" ;
?>
Select an option to see the answer and solution.
What will be the output of the following PHP code?
<?php
$score = 1234 ;
scor e b o a r d < s p an c l a ss = " p − b l u e " >= ( a r r a y ) < / s p an > score;
echo $scoreboard[ 0 ] ;
?>
Select an option to see the answer and solution.
What will be the output of the following PHP code?
<?php
$total = "25 students" ;
$more = 10 ;
t o t a l < s p an c l a ss = " p − b l u e " >=< / s p an > total + $more;
echo "$total" ;
?>
A. Error
B. 35 students
C. 35
D. 25 students
Select an option to see the answer and solution.
Which of the below statements is equivalent to a dd + = add ?
A. a dd = add
B. a dd = add +$add
C. a dd = add + 1
D. a dd = add + $add + 1
Select an option to see the answer and solution.
Which statement will output $x on the screen?
A. echo “\$x”;
B. echo “$$x”;
C. echo “/$x”;
D. echo “$x;”;
Select an option to see the answer and solution.
What will be the output of the following code?
<?php
function track()
{
static $count = 0 ;
$count++ ;
echo $count;
}
track() ;
track() ;
track() ;
?>
Select an option to see the answer and solution.
What will be the output of the following PHP code?
<?php
$a = "clue" ;
$a .= "get" ;
echo "$a" ;
?>
A. get
B. true
C. false
D. clueget
Select an option to see the answer and solution.
What will be the output of the following PHP code?
<?php
$a = 5 ;
$b = 5 ;
span class= "sys-fun" >echo ( a < s p an c l a ss = " p − b l u e " >===< / s p an > b) ;
?>
A. 5 === 5
B. Error
C. 1
D. False
Select an option to see the answer and solution.