Q.1
What will be the output of the following PHP code?
<?php
$a = 5;
$b = 5;
span class="sys-fun">echo ($a === $b);
?>
Q.2
What will be the output of the following code?
<?php 
$foo = 'Bob';
$bar = &$foo;        
$bar = "My name is $bar";
echo $bar;
echo $foo;
?>
Q.3
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”);
Q.4
What will be the output of the following PHP code?
<?php
$color = "maroon";
$var = $color[2];
echo "$var";
?>
Q.5
What will be the output of the following PHP code?
<?php
$score = 1234;
$scoreboard = (array) $score;
echo $scoreboard[0];
?>
Q.6
What will be the output of the following PHP code?
<?php
$total = "25 students";
$more = 10;
$total = $total + $more;
echo "$total";
?>
Q.7
We can use _________ to comment a single line?
1. /?
2. //
3. #
4. /* */
Q.8
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;
Q.9
What will be the output of the following php code?
<?php
$num  = 1;
$num1 = 2;
print $num . "+". $num1;
?>
0 h : 0 m : 1 s