PHP Functions Which one of the following is the right way of defining a function in PHP? functionName(parameters) { function body } data type functionName(parameters) { function body } function { function body } function fumctionName(parameters) { function body } functionName(parameters) { function body } data type functionName(parameters) { function body } function { function body } function fumctionName(parameters) { function body } ANSWER DOWNLOAD EXAMIANS APP
PHP Functions What will be the output of the following PHP code ?function time($string){echo strtr("Towe Pa55", "ow5", $string);}time("ims"); Time Pa55 Towe Pass Time Pass Towe Pa55 Time Pa55 Towe Pass Time Pass Towe Pa55 ANSWER DOWNLOAD EXAMIANS APP
PHP Functions Returning values from functions may include ..... Both A & B None of above Arrays Objects Both A & B None of above Arrays Objects ANSWER DOWNLOAD EXAMIANS APP
PHP Functions What will be the output of the following PHP code ?function TV($string){echo "my favourite TV show is ".$string;function b() {echo " I am here to spoil this code";}}function b(){echo " I am here to spoil this code";}b();TV("Sherlock"); Error My favourite TV show isI am here to spoil this code I am here to spoil this code None of the mentioned Error My favourite TV show isI am here to spoil this code I am here to spoil this code None of the mentioned ANSWER DOWNLOAD EXAMIANS APP
PHP Functions What will be the output of the following PHP code?function calc($price, $tax="") {$total = $price + ($price * $tax);echo "$total";}calc(42); Error 84 42 0 Error 84 42 0 ANSWER DOWNLOAD EXAMIANS APP
PHP Functions What will be the output of the following PHP code?function sum($num1, $num2) {$total = $num1 + $num2;echo "chr($total)";}$var1 = "sum";$var1(5, 44); 1 Sum 49 Error 1 Sum 49 Error ANSWER DOWNLOAD EXAMIANS APP