31.
What will be the output of the following PHP code ?
<?php
$a = "hello";
if (strlen($a))
    print strlen($a);
else
    print "hi";
?>

32.
What will be the output of the following PHP code ?
<?php
$a = "1";
$b = "0";
if ((int)$a && $b) 
    print"hi";
else 
    print "hello";
?>

33.
What will be the output of the following PHP code ?
<?php
$a = "1";
switch ($a)
{
case 1:
    print "hi";
case 2:
    print "hello";
default:
    print "hi1";
}
?>

34.
What will be the output of the following PHP code ?
<?php
$a = "2";
switch ($a)
{
case 1:
    print "hi";
case 2:
    print "hello";
    break;
default:
    print "hi1";
}
?>

35.
What will be the output of the following PHP code ?
<?php
$a = "1";
switch($a)
{
case 1:
    break;
    print "hi";
case 2:
    print "hello";
    break;
default:
    print "hi1";
}
?>

Read More Section(Control Structures(Loop in PHP))

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