Which one of the following is the right way of defining a function in PHP? data type functionName(parameters) { function body } function fumctionName(parameters) { function body } functionName(parameters) { function body } function { function body } TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following PHP code?<br/>echo str_pad("Salad", 5)." is good for health."; SaladSaladSaladSaladSalad is good for health is good for health SaladSaladSaladSaladSalad Salad is good for health is good for health Salad TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following PHP code ?<br/>function string()<br/>{<br/>echo strstr("Hello world!", 111);<br/>}<br/>string(); 111 o world! No Output Hello world! TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following PHP code ?<br/>function addFunction($num1, $num2)<br/>{<br/>$sum = $num1 + $num2;<br/>return $sum;<br/>}<br/>$return_value = addFunction(10, 20);<br/>echo "Returned value from the function : " .$return_value Returned value from the function : $return_value Error Returned value from the function : 30 Returned value from the function : TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following PHP code ?<br/>function 2myfunc()<br/>{<br/>echo "Hello World";<br/>}<br/>2myfunc(); ERROR No Output None of the mentioned Hello World TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following PHP code ?<br/>$var = 10;<br/>function one()<br/>{<br/>echo $var;<br/>}<br/>one(); Error 10 No Output None of the Mentioned TRUE ANSWER : ? YOUR ANSWER : ?
Which one of the following functions can be used to compress a string? gzcompress() compress() zip() zip_compress() TRUE ANSWER : ? YOUR ANSWER : ?
Which one of the following PHP functions can be used to find files? file() fold() glob() get_file() TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following PHP code?<br/>echo strtr("Hilla Warld","ia","eo"); Hilla Warld Hello World ia eo TRUE ANSWER : ? YOUR ANSWER : ?
Output will be:$array = array(0, 1, 2);$array = array_pad($array, -6, ‘NEW’); Array ( [0] => NEW [-1] => NEW [-2] => NEW [-3] => 0 [-4] => 1 [-5] => 2 ) Array ( [1] => NEW [2] => NEW [3] => NEW [4] => 0 [5] => 1 [6] => 2 ) Array ( [-1] => NEW [-2] => NEW [-3] => NEW [-4] => 0 [-5] => 1 [-6] => 2 ) Array ( [0] => NEW [1] => NEW [2] => NEW [3] => 0 [4] => 1 [5] => 2 ) TRUE ANSWER : ? YOUR ANSWER : ?