Functions Of PHP Software Language Quiz

20 Questions | Total Attempts: 184

Settings
Please wait...
PHP Quizzes & Trivia

In this quiz, we’ll be testing your knowledge on all the different functions of the widely used programming and web development language, PHP! What can you tell us about these functions and how they are used? Let’s find out!


Questions and Answers
  • 1. 
    In PHP, arrays may be sorted with which of the following functions?
    • A. 

      Uksort

    • B. 

      Arsort

    • C. 

      Ksort

    • D. 

      All of the above

  • 2. 
    PHP comments for a single line have the following syntax:
    • A. 

      /* comments /*

    • B. 

      #

    • C. 

      //

    • D. 

      ::

    • E. 

      A&B

  • 3. 
    Which of the following functions are used by PHP to find out what type a variable is?       
    • A. 

      Gettype()

    • B. 

      Is_double()

    • C. 

      Get_type()

    • D. 

      Is_date()

    • E. 

      A&B

  • 4. 
    The three possible connection states in PHP are ________.       
    • A. 

      Normal

    • B. 

      Aborted

    • C. 

      Timeout

    • D. 

      All of the above

  • 5. 
    In PHP, the error control operator is ________.       
    • A. 

      *

    • B. 

      %

    • C. 

      @

    • D. 

      &

  • 6. 
    In PHP, instructions are terminated with a _______.  
    • A. 

      ;

    • B. 

      #

    • C. 

      !

    • D. 

      %>

  • 7. 
    What does PHP stand for?       
    • A. 

      Hypertext Preprocessor

    • B. 

      Personal Home Page

    • C. 

      Private Home Page

    • D. 

      Personal Hypertext Processor

  • 8. 
    PHP server scripts are surrounded by delimiters, which?       
    • A. 

    • B. 

    • C. 

      ...

    • D. 

      ...

  • 9. 
    How do you write "Hello World" in PHP?
    • A. 

      "Hello World";

    • B. 

      Echo "Hello World";

    • C. 

      Document.Write("Hello World");

    • D. 

      Response.write("Hello World")

  • 10. 
    All variables in PHP start with which symbol?       
    • A. 

      !

    • B. 

      $

    • C. 

      &

    • D. 

      #

  • 11. 
    Include files must have the file extension ".inc"       
    • A. 

      True

    • B. 

      False

  • 12. 
    In PHP you can use both single quotes ( ' ' ) and double quotes ( " " ) for strings:       
    • A. 

      True

    • B. 

      False

  • 13. 
    What is the correct way to include the file "time.inc" ?
    • A. 

    • B. 

    • C. 

    • D. 

  • 14. 
    What is the correct way to create a function in PHP?
    • A. 

      Function myFunction()

    • B. 

      New_function myFunction()

    • C. 

      Create myFunction()

  • 15. 
    What is the correct way to connect to a MySQL database?       
    • A. 

      Mysql_open("localhost");

    • B. 

      Connect_mysql("localhost");

    • C. 

      Dbopen("localhost");

    • D. 

      Mysql_connect("localhost");

  • 16. 
    What is the correct way to add 1 to the $count variable?       
    • A. 

      Count++;

    • B. 

      $count++;

    • C. 

      ++count

    • D. 

      $count =+1

  • 17. 
    PHP can be run on Microsoft Windows IIS(Internet Information Server):       
    • A. 

      True

    • B. 

      False

  • 18. 
    In PHP 5, MySQL support is enabled by default:       
    • A. 

      True

    • B. 

      False

  • 19. 
    Which one of these variables has an illegal name?       
    • A. 

      $my-Var

    • B. 

      $myVar

    • C. 

      $my_Var

  • 20. 
    Which of the following regular expressions will match the string no.no.no?       
    • A. 

      No?no?no

    • B. 

      No*no*no*

    • C. 

      ..\...\...

    • D. 

      \.\..\.\..\.\.