1.
What will be the output of the following PHP code?
<?php
$x;
if ($x)
    print "hi" ;
else
    print "how are u";
?>

2.
What will be the output of the following PHP code ?
<?php
$x = 0;
if ($x++)
    print "hi";
else
    print "how are u";
?>

3.
What will be the output of the following PHP code ?
<?php
$x;
if ($x == 0)
    print "hi" ;
else
    print "how are u";
    print "hello"
?>

4.
What will be the output of the following PHP code ?
<?php
$x = 0;
if ($x == 1)
    if ($x >= 0)
	print "true";
    else
	print "false"; 
?>

5.
What will be the output of the following PHP code ?
<?php
$a = 1;
if ($a--)
    print "True";
if ($a++)
    print "False"; 
?>

Read More Section(Control Structures(loop In Php))

Each Section contains maximum 70 questions. To get more questions visit other sections.