Which one of the following functions can be used to compress a string? zip() gzcompress() compress() zip_compress() TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following PHP code?<br/>function do($myString) {<br/>echo strpos($myString, "donkey",0);<br/>}<br/>do("The donkey looks like a horse."); None of the mentioned 4 2 5 TRUE ANSWER : ? YOUR ANSWER : ?
Output will be:$array = array(0, 1, 2);$array = array_pad($array, -6, ‘NEW’); 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 ) Array ( [0] => NEW [1] => NEW [2] => NEW [3] => 0 [4] => 1 [5] => 2 ) TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following PHP code ?<br/>function start($string)<br/>{<br/>if ($string < 45)<br/>return 20;<br/>else<br/>return 40;<br/>}<br/>$t = start(90);<br/>if ($t < 20)<br/>{<br/>echo "Have a good day!";<br/>}<br/>else<br/>{<br/>echo "Have a good night!";} Have a good day! Have a good night! ERROR None of the mentioned TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following PHP code ?<br/>function constant()<br/>{<br/>define("GREETING", "Welcome to Narnia");<br/>echo greeting;<br/>} Welcome to Narnia GREETING ERROR greeting TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following PHP code?<br/>echo hex2bin("48656c6c6f20576f726c6421"); MCQ questons welcome to india Hello World! This is PHP! TRUE ANSWER : ? YOUR ANSWER : ?
A function in PHP which starts with ______ (double underscore) is know as. Default Function User Defined Function Inbuilt Function Magic Function 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 : Error Returned value from the function : 30 Returned value from the function : $return_value TRUE ANSWER : ? YOUR ANSWER : ?
What will happen in this function call?<br/>function calc($price, $tax) {<br/>$total = $price + $tax;<br/>}<br/>$pricetag = 15;<br/>$taxtag = 3;<br/>calc($pricetag, $taxtag); Type Hinting Call By Value Call By Reference Default Argument Value TRUE ANSWER : ? YOUR ANSWER : ?
phpinfo() will display about?<br/>1. OS version information<br/>2. PHP installation<br/>3. Variables<br/>4. HTTP headers All listed here Option 1 Option 2 Option 4 TRUE ANSWER : ? YOUR ANSWER : ?