PHP Practice Quiz MCQ Trivia: Test!

10 Questions | Total Attempts: 253

SettingsSettingsSettings
Please wait...
PHP Quizzes & Trivia

Questions and Answers
  • 1. 
    PHP uses functions to simplify repetitive tasks and allow for greater variation.
    • A. 

      True

    • B. 

      False

  • 2. 
    What symbol is used to end command in a PHP script?
    • A. 

      :

    • B. 

      ;

    • C. 

      :)

    • D. 

      .

  • 3. 
    Which statement is used when you want to have 2 possible outcomes? 
    • A. 

      If/elseif/else

    • B. 

      If/else

    • C. 

      If

  • 4. 
    What is the correct syntax for a function (not calling the function)?
    • A. 

      Car(...){...}

    • B. 

      Car{...}(...)

    • C. 

      Function car(...){...}

    • D. 

      Function car{...}(...)

  • 5. 
    Would you use a function for basic tasks?
    • A. 

      Yes

    • B. 

      No

  • 6. 
    How do you include the "test.php" file from the "scripts" folder?
    • A. 

      Include("scripts/test.php");

    • B. 

      #include("scripts/test.php");

    • C. 

      Include;

    • D. 

      Include("scripts/test.php")

  • 7. 
    What is another name for a long list of if statements?
  • 8. 
    What is a proper variable example?
    • A. 

      %Variable

    • B. 

      #Variable

    • C. 

      &Variable

    • D. 

      $Variable

  • 9. 
    Which are example of counters?
    • A. 

      $var += 1

    • B. 

      $var++

    • C. 

      $var=+1

    • D. 

      $var = $var + 1

  • 10. 
    Where can you find more information on PHP?
    • A. 

      Google

    • B. 

      Contacting Me

    • C. 

      Facebook

    • D. 

      PHP.net