PHP Arrays What will be the output of the following PHP code?$a = array("a"=>"red", "b"=>"green", "c"=>"blue");echo array_shift($a);print_r ($a); none of the mentioned green blue red none of the mentioned green blue red ANSWER DOWNLOAD EXAMIANS APP
PHP Arrays What array will you get if you convert an object to an array? An array with properties of that object as the array's elements An array with properties of that object as the Key elements An array with properties of that array as the object's elements 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 object as the Key elements An array with properties of that array as the object's elements An array with keys of that object as the array's elements ANSWER DOWNLOAD EXAMIANS APP
PHP Arrays What will be the output of the following PHP code?$number = array ("4", "hello", 2);echo (array_sum ($number)); 6 4 4hello2 2 6 4 4hello2 2 ANSWER DOWNLOAD EXAMIANS APP
PHP Arrays What will be the output of the following PHP code?$fruits = array ("mango", "apple", "pear", "peach");$fruits = array_flip($fruits);echo ($fruits[0]); error 0 peach mango error 0 peach mango ANSWER DOWNLOAD EXAMIANS APP
PHP Arrays Which of the following are correct ways of creating an array?1. state[0] = “karnataka”;2. $state[] = array(“karnataka”);3. $state[0] = “karnataka”;4. $state = array(“karnataka”); 3 and 4 2, 3 and 4 Only 1 2 and 3 3 and 4 2, 3 and 4 Only 1 2 and 3 ANSWER DOWNLOAD EXAMIANS APP
PHP Arrays 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? No Yes, but only if the array is large. Yes, but only if the function modifies the contents of the array. Yes, because PHP must monitor the execution of the function to determine if changes are made to the array. Yes, because the interpreter must always create a copy of the array before passing it to the function. No Yes, but only if the array is large. Yes, but only if the function modifies the contents of the array. Yes, because PHP must monitor the execution of the function to determine if changes are made to the array. Yes, because the interpreter must always create a copy of the array before passing it to the function. ANSWER DOWNLOAD EXAMIANS APP