What will be the output of the following PHP code ?<br/>$i = 0;<br/>for ($i) {<br/>print $i;<br/>} no output infinite loop 0 error TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following PHP code ?<br/>for ($i = 0; $i < 5; $i++) {<br/>for ($j = $i;$j > $i; $i--)<br/>print $i;<br/>} infinite loop 0 1 2 3 4 5 0 1 0 1 2 0 1 2 3 0 1 2 3 4 0 1 2 3 4 5 0 1 2 3 4 5 no output TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following PHP code ?<br/>for ($count = 1; $count < 20; $count++);<br/>print $count; 20 12345678910….1920 19 12345678910….19 TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following PHP code ?<br/>$a = "hello";<br/>if (strlen($a))<br/>print strlen($a);<br/>else<br/>print "hi"; hi hellolength 5 error TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following PHP code ?<br/>$a = 10;<br/>$b = 11;<br/>if ($a < ++$a || $b < ++$b)<br/>print "hello";<br/>else<br/>print "hi"; error hi no output hello TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following PHP code ?<br/>$a = "1";<br/>$a = 1;<br/>$b = 1;<br/>switch($a) {<br/>case $a * $b:<br/>print "hi";<br/>break;<br/>case $a / $b:<br/>print "hello";<br/>break;<br/>default:<br/>print "hi1";<br/>} hihello hi hihellohi1 hi1 TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following PHP code ?<br/>$i = "";<br/>while ($i) {<br/>print "hi";<br/>}<br/>while($i < 8)<br/>$i++;print "hello"; Hi is printed once, hello 7 times Hi is printed 8 times, hello 7 times and then hi 2 times Hi is printed 10 times, hello 7 times Hi is printed once, hello 7 times and then hi 2 times TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following PHP code ?<br/>$a = array("hi", "hello", "bye");<br/>for (;count($a) < 5;) {<br/>if (count($a) == 3)<br/>print $a;<br/>} no output ArrayArrayArrayArrayArrayArray….infinitely hihellobyehihellobyehihellobyehihellobyehihellobyehihellobye…..infinitely (“hiâ€,â€helloâ€,â€byeâ€)(“hiâ€,â€helloâ€,â€byeâ€)(“hiâ€,â€helloâ€,â€byeâ€)(“hiâ€,â€helloâ€,â€byeâ€)…infinitely TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following PHP code ?<br/>$a = "a";<br/>if ($a)<br/>print "all";<br/>else<br/>print "some"; error some all no output TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following PHP code ?<br/>for ($count = 1; $count != 20;$count++) {<br/>print $count;<br/>$count++;<br/>} 123…….20 13579…21 1357…19 Infinite TRUE ANSWER : ? YOUR ANSWER : ?