PHP Quiz | Set-2 PHP Quiz | Set-2 Please wait while the activity loads. If this activity does not load, try refreshing your browser. Also, this page requires javascript. Please visit using a browser with javascript enabled. If loading fails, click here to try again Question 1Which below method is used to compute the difference between two arrays in PHP?array_diffdiff_arrayarrays_diffdiff_arraysPHP Quiz | Set-2 Discuss itQuestion 1-Explanation: The array_diff is used to compare the difference between given arrays and return the value as a difference. It is used to compare the difference between two or more than two arrays. So for computing, the difference between the two arrays in PHP the method is used is array_diff. Question 2What is the output of the following code snippets: <?php $output = array(3, 3, 3); echo array_product($a); ?>827106PHP Quiz | Set-2 Discuss itQuestion 2-Explanation: The array_product methods in PHP are used to calculate the product of arrays, So the given values are 3,3,3, and the product of the given value is 27.Question 3 Which of the following method in PHP is used to get the current day and location? date_sunrise() sunrise() date-sunrise() None of the above PHP Quiz | Set-2 Discuss itQuestion 3-Explanation: The date_sunrise() is an inbuilt function in PHP which is used to find the sunrise time for a specified day and location. Question 4 What is the output of the below code snippets? <?php $value="GeeksForGeeks"; echo strrev("$value"); ?> skeeGroFskeeG skeeGroFskeeO skeeGorFskeeG skeeForFskeeG PHP Quiz | Set-2 Discuss itQuestion 4-Explanation: strrev is used to reverse the string in PHP so after reversing the string in PHP the value is skeeGroFskeeG. Question 5What is the output of the below code snippets? <?php while() { echo "GeeksForGeeks"; } ?> Hello WorldInfinite loopno outputError PHP Quiz | Set-2 Discuss itQuestion 5-Explanation: After running the code the error is throwing so the code is not executable.Question 6 Which of the following is used to calculate a number of character values in PHP? count($variable) len($variable) strcount($variable) strlen($variable) PHP Quiz | Set-2 Discuss itQuestion 6-Explanation: strlen($variable) is used to calculate the number of character values in PHP. The function returns the length of the $string including all the whitespaces and special characters. Question 7 Which of the following is not considered predefined values? $get $ask $request $post PHP Quiz | Set-2 Discuss itQuestion 7-Explanation: $ask is not considered as predefined value so from the above option only option $ask is correct. Question 8 Which of the following is true if you want to send input through the script in PHP? Post Get All of the above None of the above PHP Quiz | Set-2 Discuss itQuestion 8-Explanation: Get method is used if we want to send the input through the script in PHP. Question 9 The correct syntax for enclosing the PHP script are? <PHPgt; </phpgt; <?PHP ?gt; ?PHP ?PHP <p?gt; </?pgt; PHP Quiz | Set-2 Discuss itQuestion 9-Explanation: The correct syntax for enclosing is the php script are <?php ?> where , <?php is starting position and end with ?> Question 10 How many types of filtering is present in PHP? 2 3 4 None PHP Quiz | Set-2 Discuss itQuestion 10-Explanation: In PHP there are two main types of filtering: validation and sanitization. 12 There are 15 questions to complete. You have completed questions question Your accuracy is Correct Wrong Partial-Credit You have not finished your quiz. If you leave this page, your progress will be lost. Correct Answer You Selected Not Attempted Final Score on Quiz Attempted Questions Correct Attempted Questions Wrong Questions Not Attempted Total Questions on Quiz Question Details Results Date Score Hint Time allowed minutes seconds Time used Answer Choice(s) Selected Question Text All doneNeed more practice!Keep trying!Not bad!Good work!Perfect! Last Updated : 27 Sep, 2023 Share your thoughts in the comments Add Your Comment Please Login to comment...