11. What will be the output of the following PHP code ?
<?php
$a = "a";
if ($a)
print "all";
else
print "some";
?>
<?php
$a = "a";
if ($a)
print "all";
else
print "some";
?>
12. What will be the output of the following PHP code ?
<?php
$x = 10;
$y = 20;
if ($x > $y + $y != 3)
print "hi" ;
else
print "how are u";
?>
<?php
$x = 10;
$y = 20;
if ($x > $y + $y != 3)
print "hi" ;
else
print "how are u";
?>
13. What will be the output of the following PHP code ?
<?php
$x = 10;
$y = 20;
if ($x > $y && 1||1)
print "hi" ;
else
print "how are u";
?>
<?php
$x = 10;
$y = 20;
if ($x > $y && 1||1)
print "hi" ;
else
print "how are u";
?>
14. What will be the output of the following PHP code ?
<?php
$x = 10;
$y = 20;
if ($x > $y && 1||1)
print "hi" ;
else
print "how are u";
?>
<?php
$x = 10;
$y = 20;
if ($x > $y && 1||1)
print "hi" ;
else
print "how are u";
?>
15. What will be the output of the following PHP code ?
<?php
if (-100)
print "hi" ;
else
print "how are u";
?>
<?php
if (-100)
print "hi" ;
else
print "how are u";
?>
16. What will be the output of the following PHP code ?
<?php
if (0.1)
print "hi" ;
else
print "how are u";
?>
<?php
if (0.1)
print "hi" ;
else
print "how are u";
?>
17. What will be the output of the following PHP code ?
<?php
if (0.0)
print "hi" ;
else
print "how are u";
?>
<?php
if (0.0)
print "hi" ;
else
print "how are u";
?>
18. What will be the output of the following PHP code ?
<?php
if (print "0")
print "hi" ;
else
print "how are u";
?>
<?php
if (print "0")
print "hi" ;
else
print "how are u";
?>
19. What will be the output of the following PHP code ?
<?php
$x = 1;
if ($x == 2)
print "hi" ;
else if($x = 2)
print $x;
else
print "how are u";
?>
<?php
$x = 1;
if ($x == 2)
print "hi" ;
else if($x = 2)
print $x;
else
print "how are u";
?>
20. What will be the output of the following PHP code ?
<?php
$x = 1;
if ($x = $x& 0)
print $x ;
else
print "how are u";
?>
<?php
$x = 1;
if ($x = $x& 0)
print $x ;
else
print "how are u";
?>