Q.1
What will be the output of the following PHP code ?
<?php
echo "Hello World"
?>
Q.2
What will be the output of the following PHP code ?
<?php
$y = 2;
$w = 4;
$y *= $w /= $y;
echo $y, $w;
?>
Q.3
What will be the output of the following PHP code ?
<?php
$y = 2;
if ($y-- == ++$y)
{
    echo $y;
}
?>
Q.4
What will be the output of the following PHP code ?
<?php
$y = 2;
if (**$y == 4)
{
    echo $y;
}
?>
Q.5
What will be the output of the following PHP code ?
<?php
$y = 2;
if (--$y == 2 || $y xor --$y)
{
    echo $y;
}
?>
Q.6
What will be the output of the following PHP code ?
<?php
$x = 0;
function fun()
{
    echo $GLOBALS['x'];
    $x++;
}
fun();
fun();
fun();
?>
Q.7
What will be the output of the following PHP code ?
<?php
$y = 2;
if (--$y <> ($y != $y++))
{
    echo $y;
}
?>
Q.8
What will be the output of the following PHP code ?
<?php
$a = 10;
echo ++$a;
echo $a++;
echo $a;
echo ++$a;
?>
Q.9
What will be the output of the following PHP code ?
<?php
$var1 = 3;
print ++$var++;
?>
Q.10
What will be the output of the following PHP code ?
<?php
$i = 2;
while (++$i)
{   
    while ($i --> 0)
        print $i;
}
?>
Q.11
What will be the output of the following PHP code ?

<?php
echo $x-- != ++$x;
?>
Q.12
What will be the output of the following PHP code ?
<?php
$a = 12;
--$a;
echo $a++;
?>
Q.13
What will be the output of the following PHP code ?
<?php
$x = "test";
$y = "this";
$z = "also"; 
$x .= $y .= $z ;
echo $x;
echo $y;
?>
Q.14
What will be the output of the following PHP code ?
<?php
$i = 2;
while (++$i)
{   
    while (--$i > 0)
        print $i;
}
?>
Q.15
What will be the output of the following PHP code ?
<?php
echo 5 * 9 / 3 + 9;
?>
Q.16
What will be the output of the following PHP code ?
<?php
$var1 = 0;
$var1 = $var1++ + 5; 
echo $var1; 
?>
Q.17
What will be the output of the following PHP code ?
<?php
$auth = 1;
$status = 1;
if ($result = (($auth == 1) && ($status != 0)))
{
    print "result is $result";
}
?>
Q.18
What will be the output of the following PHP code ?
<?php
$i = 0;
while ($i = 10)
{   
    print "hi";
}
print "hello";
?>
Q.19
What will be the output of the following PHP code ?
<?php
$i = 5;
while (--$i > 0 && ++$i)
{   
    print $i;
}<
?>
Q.20
What will be the output of the following PHP code ?
<?php
$x = 1;
$y = 2;
if (++$x == $y++)
{
    echo "true ", $y, $x;
}
?>
Q.21
What will be the output of the following PHP code ?
<?php
$i = 0;
$j = 0;
if ($i &&  ($j = $i + 10)) 
{
    echo "true";
}
echo $j;
?>
Q.22
What will be the output of the following PHP code ?
<?php
$i = 10;
$j = 0;
if ($i || ($j = $i + 10)) 
{
    echo "true";
}
echo $j;
?>
Q.23
What will be the output of the following PHP code ?
<?php
$var1 = 0;
$var1 = ++$var1 + 5; 
echo $var1; 
?>
Q.24
What will be the output of the following PHP code ?
<?php
$var1 = 0;
$var1 = $var1 + 5; 
echo $var1++; 
?>
Q.25
What will be the output of the following PHP code ?
<?php
$i = "";
while ($i = 10)
{   
    print "hi";
}
print "hello";
?>
Q.26
What will be the output of the following PHP code ?
<?php
$i = 5;
while (--$i > 0 || ++$i)
{   
    print $i;
}
?>
Q.27
What will be the output of the following PHP code ?
<?php
$i = 0;
while(++$i || --$i)
{   
    print $i;
}
?>
Q.28
What will be the output of the following PHP code ?
<?php
 $a = 5; $b = -7; $c =0; 
 $d = ++$a && ++$b || ++$c;
 print $d; print $a;
?>
Q.29
What will be the output of the following PHP code ?
<?php
$i = 1;
if ($i++ && ($i == 1))
    printf("Yesn$i");
else
    printf("Non$i");
?>
Q.30
What will be the output of the following PHP code ?
<?php
$var1 = 1;
echo $var1 = ++$var1 % 2 + ++$var1; 
?>
0 h : 0 m : 1 s