Q.1
What will be the output of the following PHP code ?
<?php
for ($count = 1; $count != 20;$count++)
{
    print $count;
    $count++;
}
?>
Q.2
What will be the output of the following PHP code ?
<?php
for ($x =1; $x < 10;++$x)
{
    print "*t";
}
?>
Q.3
What will be the output of the following PHP code ?
<?php
for ($count = 1; $count < 20; $count++);
    print $count;
?>
Q.4
What will be the output of the following PHP code ?
<?php
for ($x = -1; $x < 10;--$x)
{
    print $x;
}
?>
Q.5
What will be the output of the following PHP code ?
<?php
$i = 0;
while (++$i && --$i)
{   
    print $i;
}
?>
Q.6
What will be the output of the following PHP code ?
<?php
$i = 0;
while ((--$i > ++$i) - 1)
{   
    print $i;
}
?>
Q.7
What will be the output of the following PHP code ?
<?php
$x;
for ($x = -3; $x < -5; ++$x)
{
    print ++$x;
}
?>
Q.8
What will be the output of the following PHP code ?
<?php
for ($i++; $i == 1; $i = 2)
    print "In for loop ";
    print "After loopn";
?>
Q.9
What will be the output of the following PHP code ?
<?php
$i = 0
do
{
    $i++;
}
while ($i < 3);
print $i;
?>
Q.10
What will be the output of the following PHP code ?
<?php
$i = "";
while ($i = 10)
{   
    print "hi";
}
print "hello";
?>
Q.11
What will be the output of the following PHP code ?
<?php
$i = 2;
while (++$i)
{   
    while ($i --> 0)
    print $i;
}
?>
Q.12
What will be the output of the following PHP code ?
<?php
$i = 2;
while (++$i)
{   
    while (--$i > 0)
    print $i;
}
?>
Q.13
What will be the output of the following PHP code ?
<?php
$i = 0
while ($i++)
{
    print $i;
}
print $i;
?>
Q.14
What will be the output of the following PHP code ?
<?php
$i = "";
while($i)
{   
    print "hi";
}
print "hello";
?>
Q.15
What will be the output of the following PHP code ?
<?php
$i = 5;
while (--$i > 0)
{   
    $i++; print $i; print "hello";
}
?>
Q.16
What will be the output of the following PHP code ?
<?php
$i = 0;
for ($i)
{
    print $i;
}
?>
Q.17
What will be the output of the following PHP code ?
<?php
switch($b)
{
case 2:
    print "hello";
    break;
case 1:
    print "hi";
    break;
}
?>
Q.18
What will be the output of the following PHP code ?
<?php
switch($b)
{
case 2:
    print "hello";
    break;
case b:
    print "hi";
    break;
}
?>
Q.19
What will be the output of the following PHP code ?
<?php
$i = "";
while ($i)
{   
    print "hi";
} 
while($i < 8)
    $i++;
print "hello";
?>
Q.20
What will be the output of the following PHP code ?
<?php
$i = 0;
while($i = 10)
{   
    print "hi";
}
print "hello";
?>
0 h : 0 m : 1 s