PHP Quiz For My Company

20 Questions | Total Attempts: 137

SettingsSettingsSettings
Please wait...
PHP Quizzes & Trivia

PHP, originally standing for Personal Home Page, is a server-side scripting language used all around the word in the designing of webpages and in web development in general. Do you know it well enough? Let’s find out!


Questions and Answers
  • 1. 
    What does PHP stand for?
    • A. 

      PHP: Hypertext Preprocessor

    • B. 

      Personal Home Page

    • C. 

      Private Home Page

    • D. 

      Personal Hypertext Processor

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

      ...

    • B. 

    • C. 

      ...

    • D. 

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

      Document.Write("Hello World");

    • B. 

      "Hello World";

    • C. 

      Echo "Hello World";

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

      !

    • B. 

      &

    • C. 

      $

  • 5. 
    What is the correct way to end a PHP statement?
    • A. 

    • B. 

      New line

    • C. 

      ;

    • D. 

      .

  • 6. 
    The PHP syntax is most similar to:
    • A. 

      VBScript

    • B. 

      Perl and C

    • C. 

      JavaScript

  • 7. 
    How do you get information from a form that is submitted using the "get" method?
    • A. 

      Request.QueryString;

    • B. 

      Request.Form;

    • C. 

      $_GET[];

  • 8. 
    When using the POST method, variables are displayed in the URL:
    • A. 

      True

    • B. 

      False

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

      False

    • B. 

      True

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

      False

    • B. 

      True

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

    • B. 

    • C. 

    • D. 

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

      Create myFunction()

    • B. 

      New_function myFunction()

    • C. 

      Function myFunction()

  • 13. 
    What is the correct way to open the file "time.txt" as readable?
    • A. 

      Fopen("time.txt","r");

    • B. 

      Open("time.txt");

    • C. 

      Fopen("time.txt","r+");

    • D. 

      Open("time.txt","read");

  • 14. 
    PHP allows you to send emails directly from a script
    • A. 

      True

    • B. 

      False

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

      Mysql_connect("localhost");

    • B. 

      Connect_mysql("localhost");

    • C. 

      Dbopen("localhost");

    • D. 

      Mysql_open("localhost");

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

      ++count

    • B. 

      Count++;

    • C. 

      $count++;

    • D. 

      $count =+1

  • 17. 
    What is a correct way to add a comment in PHP?
    • A. 

      *\..\*

    • B. 

    • C. 

    • D. 

      /*…*/

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

      True

    • B. 

      False

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

      True

    • B. 

      False

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

      $my_Var

    • B. 

      $my-Var

    • C. 

      $myVar