PHP Quiz (Set 8) PHP (Set 8) 1 / 10 Which PHP function is used to sort an array in ascending order? array_sort() sort() ascend() order() 2 / 10 What is the purpose of the 'array_merge()' function in PHP? To combine two arrays and remove duplicates To merge two arrays into a multidimensional array To extract a portion of an array To combine two or more arrays into a single array 3 / 10 What does the 'session_destroy()' function do in PHP? Destroys the server's session file Destroys a specific session variable Ends the current session and deletes all session data Ends the current session but retains session data 4 / 10 What is the purpose of the 'date()' function in PHP? To retrieve the current date and time To format strings To perform mathematical operations To retrieve the length of a string 5 / 10 What is the purpose of the 'strtoupper()' function in PHP? To split a string into an array of substrings based on a delimiter To replace occurrences of a substring with another substring To convert a string to uppercase To extract a portion of a string 6 / 10 What is the purpose of the 'substr()' function in PHP? To split a string into an array of substrings based on a delimiter To replace occurrences of a substring with another substring To extract a portion of a string To convert a string to lowercase 7 / 10 Which of the following is an example of an associative array in PHP? $array = [1, 2, 3]; $array = array(1 => 'one', 2 => 'two', 3 => 'three'); $array = [0 => 'zero', 1 => 'one', 2 => 'two']; $array = ('one', 'two', 'three'); 8 / 10 What is the purpose of the 'file_get_contents()' function in PHP? To write data to a file To read the contents of a directory To retrieve the contents of a file as a string To retrieve the contents of a web page 9 / 10 Which PHP function is used to include the contents of a PHP file? include() require() import() load() 10 / 10 What is the purpose of the '$_GET' superglobal in PHP? To store form data To store user-specific data across multiple pages To retrieve data sent via URL parameters To retrieve data from a database Your score isThe average score is 0% 0% Restart quiz