What will be the output of the following PHP code?<br/>$fruits = array ("apple", "mango", "peach", "pear", "orange");<br/>$subset = array_splice ($fruits, 2);<br/>print_r ($fruits); Array ( [0] => pear [1] => orange ) Array ( [0] => apple [1] => mango [2] => peach ) Error Array ( [0] => apple [1] => mango ) TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following PHP code ?<br/>$a1 = array("a" => "red", "b" => "green", "c" => "blue", "d" => "yellow");<br/>$result = array_flip($a1);<br/>print_r($result); Array ( [a] => red [b] => green [c] => blue [d] => yellow ) Array ( [red] => red [green] => green [blue] => blue [yellow] => yellow ) Array ( [a] => a [b] => b [c] => c [d] => d ) Array ( [red] => a [green] => b [blue] => c [yellow] => d ) TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following PHP code?<br/>$fruits = array ("apple", "orange", array ("pear", "mango"), "banana");<br/>echo (count($fruits, 1)); 3 4 5 6 TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following PHP code ?<br/>$city_west = array("NYC", "London");<br/>$city_east = array("Mumbai", "Beijing");<br/>print_r(array_replace($city_west, $city_east)); Array ( [0] => NYC [1] => London ) Array ( [1] => NYC [0] => London ) Array ( [1] => Mumbai [0] => Beijing ) Array ( [0] => Mumbai [1] => Beijing ) TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following PHP code ?<br/>$a = array(12, 5, 2);<br/>echo(array_product($a)); 060 010 120 024 TRUE ANSWER : ? YOUR ANSWER : ?
What array will you get if you convert an object to an array? An array with keys of that object as the array's elements An array with properties of that object as the array's elements An array with properties of that array as the object's elements An array with properties of that object as the Key elements TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following PHP code?<br/>$place = array("NYC", "LA", "Paris");<br/>array_pop($place);<br/>$place1 = array("Paris");<br/>$place = array_merge($place, $place1);<br/>print_r($place); None of the mentioned Array ( [0] => LA [1] => Paris [2] => Paris ) Array ( [0] => NYC [1] => LA [2] => Paris [3] => Paris ) Array ( [0] => NYC [1] => LA [2] => Paris) TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following PHP code?<br/>$a1 = array("red", "green");<br/>$a2 = array("blue", "yellow");<br/>$a3 = array_merge($a1, $a2);<br/>$a4 = array("a", "b", "c", "d");<br/>$a = array_combine($a4, $a3);<br/>print_r($a); Array ( [0] => red [1] => green [2] => blue [3] => yellow ) Array ( [0] => blue [1] => yellow [2] => red [3] => green ) Array ( [a] => blue [b] => yellow [c] => red [d] => green ) Array ( [a] => red [b] => green [c] => blue [d] => yellow ) TRUE ANSWER : ? YOUR ANSWER : ?
Absent any actual need for choosing one method over the other, does passing arrays by value to a read-only function reduce performance compared to passing them by reference? Yes, because the interpreter must always create a copy of the array before passing it to the function. Yes, because PHP must monitor the execution of the function to determine if changes are made to the array. Yes, but only if the function modifies the contents of the array. No Yes, but only if the array is large. TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following PHP code?<br/>$number = array ("4", "hello", 2);<br/>echo (array_sum ($number)); 2 4hello2 4 6 TRUE ANSWER : ? YOUR ANSWER : ?