Home / CSE MCQs / PHP MCQs :: PHP Basics

CSE MCQs :: PHP MCQs

  1. What does PHP stand for?
    i) Personal Home Page
    ii) Hypertext Preprocessor
    iii) Pretext Hypertext Processor
    iv) Preprocessor Home Page
  2. A.
    Both (i) and (ii)
    B.
    Both (ii) and (iv)
    C.
    Only (ii)
    D.
    Both (i) and (iii)

  3. Who is the father of PHP?
  4. A.
    Rasmus Lerdorf
    B.
    Willam Makepiece
    C.
    Drek Kolkevi
    D.
    List Barely

  5. PHP files have a default file extension of.
  6. A.
    .html
    B.
    .xml
    C.
    .php
    D.
    .ph

  7. A PHP script should start with ___ and end with ___:
  8. A.
    < php > 
    B.
    < ? php ?> 
    C.
    < ? ? > 
    D.
    < ?php ? > 

  9. Which of the looping statements is/are supported by PHP?
    i) for loop
    ii) while loop
    iii) do-while loop
    iv) foreach loop
  10. A.
    (i) and (ii)
    B.
    (i), (ii) and (iii)
    C.
    All of the mentioned
    D.
    None of the mentioned

  11. Which of the following is/are a PHP code editor? ditor?
    i) Notepad
    ii) Notepad++
    iii) Adobe Dreamweaver
    iv) PDT
  12. A.
    Only (iv)
    B.
    All of the mentioned.
    C.
    (i), (ii) and (iii)
    D.
    Only (iii)

  13. Which of the following must be installed on your computer so as to run PHP script?
    i) Adobe Dreamweaver
    ii) PHP
    iii) Apache
    iv) IIS
  14. A.
    All of the mentioned
    B.
    Only (ii)
    C.
    (ii) and (iii)
    D.
    (ii), (iii) and (iv)

  15. Which version of PHP introduced Try/catch Exception?
  16. A.
    PHP 4
    B.
    PHP 5
    C.
    PHP 5.3
    D.
    PHP 6

  17. We can use ___ to comment a single line?
    i) /?
    ii) //
    iii) #
    iv) /* */
  18. A.
    Only (ii)
    B.
    (i), (iii) and (iv)
    C.
    (ii), (iii) and (iv)
    D.
    Both (ii) and (iv)

  19. Which of the below symbols is a newline character?
  20. A.
    \r
    B.
    \n
    C.
    /n
    D.
    /r