• Courses
  • Tutorials
  • DSA
  • Data Science
  • Web Tech
Switch to Dark Mode

PHP Quiz | Set-3

Last Updated : Apr 2, 2024
Discuss
Comments

Question 1

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

Question 2

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

  • A

    \l

  • B

    \n

  • C

    /r

  • D

    /n

Question 3

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

Question 4

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

  • A

    this_array()

  • B

    is_array()

  • C

    while_array()

  • D

    are_array()

Question 5

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

  • A

    last()

  • B

    before()

  • C

    prev()

  • D

    Previous()

Question 6

In the PHP the filesize() function returns which of the following size?
  • A
    bits
  • B
    bytes
  • C
    kilobytes
  • D
    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?
  • A
    file_contents()
  • B
    file_get_contents()
  • C
    file_content_get()
  • D
    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");
?>
  • A
    Valid
  • B
    Not Valid
  • C
    Error
  • D
    None of the above

Question 10

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

Ready to go from coding beginner to development pro? Our DSA to Development Coding Guide has everything you need to crush coding interviews and ace real-world projects! Limited spots available!
Enroll Now and Transform Your Coding Skills! Also get 90% fee refund on completing 90% of the course in 90 days! Take the Three 90 Challenge today.

There are 15 questions to complete.

Take a part in the ongoing discussion