PHP Quiz (Set 14) PHP (Set 4) 1 / 10 What is the purpose of the 'ob_start()' function in PHP? To start a new session To display output immediately To buffer output and store it in an internal buffer To send HTTP headers to the browser 2 / 10 What is the purpose of the 'header()' function with the 'Location' parameter? To send an HTTP response header To redirect the user to a different web page To set the character encoding of the webpage To include an external CSS file 3 / 10 What is the purpose of the 'move_uploaded_file()' function in PHP? To move a file from one directory to another To copy a file from one directory to another To delete a file To rename a file 4 / 10 What is the purpose of the 'filter_var()' function in PHP? To encode data as JSON To filter and sanitize data based on a specified filter To create HTML forms To validate XML data 5 / 10 What is the purpose of the 'str_replace()' 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 uppercase 6 / 10 What is the purpose of the 'include_once()' function in PHP? To include the contents of a PHP file once To include the contents of a PHP file multiple times To include an external JavaScript file To include the contents of an HTML file 7 / 10 Which of the following PHP data types is not scalar? integer string boolean array 8 / 10 What does the 'json_encode()' function do in PHP? Converts a JSON string to a PHP array Converts a PHP array or object to a JSON string Decodes a JSON string into a PHP object Encodes a PHP object into a JSON string 9 / 10 What is the 'PDO' extension used for in PHP? To manipulate XML data To perform image processing To work with databases using a consistent interface To create user interfaces 10 / 10 What is the purpose of the 'array_reverse()' function in PHP? To reverse the order of elements in an array To sort an array in descending order To shuffle the elements of an array To extract a portion of an array Your score isThe average score is 0% 0% Restart quiz