PHP Functions What will be the output of the following PHP code?function b() {echo "b is executed";}function a(){b();echo "a is executed";b();}a(); a is executed b is executedb is executedb is executed b is executeda is executed b is executeda is executedb is executed a is executed b is executedb is executedb is executed b is executeda is executed b is executeda is executedb is executed ANSWER DOWNLOAD EXAMIANS APP
PHP Functions What will be the output of the following PHP code?function a() {function b() {echo 'I am b';}echo 'I am a';}a();a(); Error I am a Error I am b I am bI am a Error I am a Error I am b I am bI am a ANSWER DOWNLOAD EXAMIANS APP
PHP Functions Which one of the following is the right way of defining a function in PHP? data type functionName(parameters) { function body } functionName(parameters) { function body } function fumctionName(parameters) { function body } function { function body } data type functionName(parameters) { function body } functionName(parameters) { function body } function fumctionName(parameters) { function body } function { function body } ANSWER DOWNLOAD EXAMIANS APP
PHP Functions What will be the output of the following PHP code?function addFunction($num1, $num2) {$sum = $num1 + $num2;return $sum;}$return_value = addFunction(10, 20);echo "Returned value from the function : $return_value" Returned value from the function : Returned value from the function : 30 Error Returned value from the function : $return_value Returned value from the function : Returned value from the function : 30 Error Returned value from the function : $return_value ANSWER DOWNLOAD EXAMIANS APP
PHP Functions What will be the output of the following PHP code?function foo($msg) {echo "$msg";}$var1 = "foo";$var1("will this work"); $msg 0 Will this work Error $msg 0 Will this work Error ANSWER DOWNLOAD EXAMIANS APP
PHP Functions What will be the output of the following PHP code ?function constant(){define("GREETING", "Welcome to Narnia");echo greeting;} greeting GREETING Welcome to Narnia ERROR greeting GREETING Welcome to Narnia ERROR ANSWER DOWNLOAD EXAMIANS APP