PHP Developer Quiz Questions and Answers

What does PHP stand for? i) Personal Home Page ii) Hypertext Preprocessor iii) Pretext Hypertext Processor iv) Preprocessor Home Page

Answer :
  • Both i) and ii)

PHP files have a default file extension of_______.

Answer :
  •  .PHP

What should be the correct syntax to write a PHP code?

Answer :
  • < ? ? >

Which of the following is/are a PHP code editor? i) Notepad ii) Notepad++ iii) Adobe Dreamweaver iv) PDT

Answer :
  • i), ii), iii) and iv)

Which of the following must be installed on your computer so as to run PHP script? i) Adobe Dreamweaver ii) XAMPP iii) Apache and PHP iv) IIS

Answer :
  • ii), iii) and iv)

Which version of PHP introduced Try/catch Exception?

Answer :
  • PHP 5 and later

How should we add a single line comment in our PHP code? i) /? ii) // iii) # iv) /* */

Answer :
  • ii), iii) and iv)

Which of the below statements is equivalent to $add += $add?

Answer :
  • $add = $add +$add

Which statement will output $x on the screen?

Answer :
  • echo “\$x”;

Which of the below symbols is a newline character?

Answer :
  •  \n