PHP Arrays What will be the output of the following PHP code?$fruits = array ("apple", "orange", array ("pear", "mango"), "banana");echo (count($fruits, 1)); 5 4 6 3 5 4 6 3 ANSWER DOWNLOAD EXAMIANS APP
PHP Arrays Which array function checks if the specified key exists in the array? array_key_exists() arrays_key_exists() array_keys_exists() array_key_exist() array_key_exists() arrays_key_exists() array_keys_exists() array_key_exist() 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? Yes, but only if the function modifies the contents of the array. Yes, but only if the array is large. No 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. Yes, but only if the array is large. No 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. ANSWER DOWNLOAD EXAMIANS APP
PHP Arrays Array values are keyed by ______ values (called indexed arrays) or using ______ values (called associative arrays). Of course, these key methods can be combined as well. Even number, string String, Boolean Float, string Positive number, negative number Integer, string Even number, string String, Boolean Float, string Positive number, negative number Integer, string 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”); 2 and 3 Only 1 2, 3 and 4 3 and 4 2 and 3 Only 1 2, 3 and 4 3 and 4 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 Key elements An array with properties of that array as the object's elements An array with properties of that object as the array's elements An array with keys 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 properties of that object as the array's elements An array with keys of that object as the array's elements ANSWER DOWNLOAD EXAMIANS APP