• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests

PHP Quiz | Set-3

Question 1

Which inbuilt function in PHP is used to sort the element in Descending order?
  • sort()
  • asort()
  • dsort()
  • rsort()

Question 2

In PHP if we put the element in the new line then which of the correct symbol is used?

  • \l

  • \n

  • /r

  • /n

Question 3

Which of the below data is termed as the external data in PHP?
  • Cookies
  • Web service data
  • Server variables
  • All of the above

Question 4

Which built-in function in the PHP adds value to the end of the array?

  • this_array()

  • is_array()

  • while_array()

  • are_array()

Question 5

Which of the following function is used to move the pointer to the previous array position?

  • last()

  • before()

  • prev()

  • Previous()

Question 6

In the PHP the filesize() function returns which of the following size?
  • bits
  • bytes
  • kilobytes
  • gigabytes

Question 7

Which of the following is used to destroy the session?

  • session_start() function

  • $_SESSION[]

  • isset() function

  • session_destroy function

Question 8

Which of the following function is used to reading the string variable?
  • file_contents()
  • file_get_contents()
  • file_content_get()
  • fget_content()

Question 9

What is the correct output of the below code snippets?
<?php
    $number = "123456";
    if (!filter_var($number, FILTER_VALIDATE_INT))
        echo("Valid");
    else
         echo("Not Valid");
?>
  • Valid
  • Not Valid
  • Error
  • None of the above

Question 10

If we filter many variables into one then which of the following filter is used?
  • filter_var_array()
  • filter_var()
  • filter_input
  • filter_input_array

There are 15 questions to complete.

Last Updated :
Take a part in the ongoing discussion