What will be the output of the following PHP code?<br/>$op2 = "blabla"; function foo($op1) {<br/>echo $op1;<br/>echo $op2;<br/>}<br/>foo("hello"); Error helloblabla helloblablablabla hello TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following PHP code?<br/>echo ord ("hi"); 106 103 104 209 TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following PHP code ?<br/>function test($int)<br/>{<br/>if ($int == 1)<br/>echo "This Works";<br/>if ($int == 2)<br/>echo "This Too Seems To Work";<br/>}<br/>test(1);<br/>TEST(2); ERROR This WorksThis Too Seems To Work This Too Seems To Work This Works TRUE ANSWER : ? YOUR ANSWER : ?
Returning values from functions may include ..... None of above Objects Arrays Both A & B TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following PHP code ?<br/>function A1($x) { switch($x) {<br/>case 1:<br/>//this statement is the same as <br/>if($x == 1)<br/>echo 'Case 1 was executed.';<br/>break;<br/>case 2:<br/>//this statement is the same as<br/>if($x == 2)<br/>echo 'Case 2 was executed.';<br/>break;<br/>case 3:<br/>//this statement is the same as<br/>if($x == 3)<br/>echo 'Case 3 was executed.';<br/>break;<br/>case 4:<br/>//this statement is the same as<br/>if($x == 4)<br/>echo 'Case 4 was executed.';<br/>break;<br/>default:<br/>//this statement is the same as if $x does not equal the other conditions<br/>echo 'Default was executed.';<br/>break;<br/>}<br/>}<br/>A1(9); Case 4 was executed Case 2 was executed Case 1 was executed Default was executed TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following PHP code ?<br/>$x = 75;<br/>$y = 25;<br/>function addition()<br/>{<br/>$GLOBALS['z'] = $GLOBALS['x'] + $GLOBALS['y'];<br/>}<br/>addition();<br/>echo $z; error 100 25 75 TRUE ANSWER : ? YOUR ANSWER : ?
The arguments in a function are evaluated from ..... right to left Always right to left sometimes left to right and sometimes right to left left to right TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following PHP code?<br/>function calc($price, $tax="") {<br/>$total = $price + ($price * $tax);<br/>echo "$total";<br/>}<br/>calc(42); Error 42 84 0 TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following PHP code ?<br/>function calc($num1, $num2)<br/>{<br/>$total = $num1 * $num2;<br/>}<br/>$result = calc(42, 0);<br/>echo $result; 42 84 0 Error TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following PHP code?<br/>function a() {<br/>function b() {<br/>echo 'I am b';<br/>}<br/>echo 'I am a';<br/>}<br/>b();<br/>a(); I am bI am a Error I am a Error I am b TRUE ANSWER : ? YOUR ANSWER : ?