PHP Control Structures (Loop) What will be the output of the following PHP code ?$a = "hello";if (strlen($a))print strlen($a);elseprint "hi"; 5 hi hellolength error 5 hi hellolength error ANSWER DOWNLOAD EXAMIANS APP
PHP Control Structures (Loop) What will be the output of the following PHP code ?for ($i = 0; -5 ; $i++) {print"i";if ($i == 3)break;} 0 1 2 3 0 1 2 3 4 5 0 1 2 3 4 error 0 1 2 3 0 1 2 3 4 5 0 1 2 3 4 error ANSWER DOWNLOAD EXAMIANS APP
PHP Control Structures (Loop) What will be the output of the following PHP code ?$b = 1;switch($b) {case 1.0:print "hi";break;case 1:print "hello";break;default:print "hi1";} hello hi hihellohi1 hihello hello hi hihellohi1 hihello ANSWER DOWNLOAD EXAMIANS APP
PHP Control Structures (Loop) What will be the output of the following PHP code ?$a = array("hi", "hello", "bye");for (;count($a) < 5;) {if (count($a) == 3)print $a;} no output ArrayArrayArrayArrayArrayArray….infinitely (“hiâ€,â€helloâ€,â€byeâ€)(“hiâ€,â€helloâ€,â€byeâ€)(“hiâ€,â€helloâ€,â€byeâ€)(“hiâ€,â€helloâ€,â€byeâ€)…infinitely hihellobyehihellobyehihellobyehihellobyehihellobyehihellobye…..infinitely no output ArrayArrayArrayArrayArrayArray….infinitely (“hiâ€,â€helloâ€,â€byeâ€)(“hiâ€,â€helloâ€,â€byeâ€)(“hiâ€,â€helloâ€,â€byeâ€)(“hiâ€,â€helloâ€,â€byeâ€)…infinitely hihellobyehihellobyehihellobyehihellobyehihellobyehihellobye…..infinitely ANSWER DOWNLOAD EXAMIANS APP
PHP Control Structures (Loop) What will be the output of the following PHP code ?$a = "a";if ($a)print "all";elseprint "some"; some no output all error some no output all error ANSWER DOWNLOAD EXAMIANS APP
PHP Control Structures (Loop) What will be the output of the following PHP code ?for ($i = 0; $i < 5; $i++) {for ($j = $i;$j > $i; $i--)print $i;} 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 0 1 2 3 4 5 infinite loop 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 0 1 2 3 4 5 infinite loop ANSWER DOWNLOAD EXAMIANS APP