PHP Control Structures (Loop) What will be the output of the following PHP code ?$b = 1;switch(print $b) {case 2:print "hello";break;case 1:print "hi";break;default:print "hi1";} 1hi 1hi1 error 1hello 1hi 1hi1 error 1hello ANSWER DOWNLOAD EXAMIANS APP
PHP Control Structures (Loop) What will be the output of the following PHP code ?$a = "1";switch($a) {case 1:break;print "hi";case 2:print "hello";break;default:print "hi1";} hihi1 hi1 no output hihellohi1 hihi1 hi1 no output hihellohi1 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 > 0; $i--)print $i;} 0 1 2 3 4 5 no output 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 0 1 2 3 4 5 no output 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 ANSWER DOWNLOAD EXAMIANS APP
PHP Control Structures (Loop) What will be the output of the following PHP code ?$user = array("Ashley", "Bale", "Shrek", "Blank");for ($x=0; $x < count($user) - 1; $x++) {if ($user[$x++] == "Shrek")continue;printf ($user[$x]);} AshleyShrek Bale BaleBlank AshleyBaleBlank AshleyShrek Bale BaleBlank AshleyBaleBlank ANSWER DOWNLOAD EXAMIANS APP
PHP Control Structures (Loop) What will be the output of the following PHP code ?$i = 0;while ($i++) {print $i;}print $i; 0 01 infinite loop 1 0 01 infinite loop 1 ANSWER DOWNLOAD EXAMIANS APP
PHP Control Structures (Loop) What will be the output of the following PHP code ?for ($i = 0; $i % ++$i; $i++) {print"i";} error infinite loop no output 0 error infinite loop no output 0 ANSWER DOWNLOAD EXAMIANS APP