PHP Quiz (Set 3) PHP (Set 3) 1 / 10 What is the purpose of the 'list()' construct in PHP? To create an associative array To assign values from an array to a list of variables To remove elements from an array To reverse the order of elements in an array 2 / 10 What is the purpose of the 'is_array()' function in PHP? To check if a variable is a string To check if a variable is a number To check if a variable is an array To check if a variable is empty 3 / 10 What is the purpose of the 'array_change_key_case()' function in PHP? To change the case of array values to uppercase To change the case of array keys to uppercase To reverse the order of elements in an array To remove duplicate values from an array 4 / 10 What is the purpose of the 'usort()' function in PHP? To sort an array in descending order To merge two arrays and remove duplicates To remove duplicate values from an array To sort an array in ascending order using a user-defined comparison function 5 / 10 What is the purpose of the 'range()' function in PHP? To remove elements from an array To reverse the order of elements in an array To create a new array with a range of values To sort the elements of an array 6 / 10 What is the purpose of the 'json_encode()' function in PHP? To decode a JSON string into a PHP array To encode a PHP array into a JSON string To serialize a PHP array To format a PHP array for printing 7 / 10 What is the purpose of the 'array_flip()' function in PHP? To reverse the order of elements in an array To swap keys and values in an associative array To convert a numeric array into an associative array To remove duplicate values from an array 8 / 10 What is the difference between 'array_merge()' and the '+' operator for arrays in PHP? 'array_merge()' can merge arrays with non-numeric keys, while the '+' operator cannot 'array_merge()' can only merge arrays with numeric keys, while the '+' operator can merge arrays with any keys Both 'array_merge()' and the '+' operator can merge arrays with any keys There is no difference; 'array_merge()' and the '+' operator are interchangeable 9 / 10 What is the purpose of the 'compact()' function in PHP? To create a new array by combining two arrays To create an array containing variables and their values To remove duplicate values from an array To reverse the order of elements in an array 10 / 10 What is the purpose of the 'array_map()' function in PHP? To apply a callback function to each element of an array To combine two arrays into a single array To merge two arrays and remove duplicates To reverse the order of elements in an array Your score isThe average score is 0% 0% Restart quiz