PHP Developer Quiz Questions and Answers

Which one of the following keywords is used to define an abstract class?

Answer :
  • abstract

Which one of the following classes cannot be instantiated?

Answer :
  • abstract class

How many of the following can be contained in constants? i) boolean ii) integer iii)

Answer :
  • 4

What will happen if you try to set a value to a constant once it has been declared?

Answer :
  • Parse Error

Which keyword is used to declare a constant property?

Answer :
  • const

Which version of PHP allows you to define constant properties within a class?

Answer :
  • PHP 5

What does PDO stand for?

Answer :
  • PHP Data Object

In which of the following circumstance should you use a static reference to a non-static method?

Answer :
  • Making a method call using parent

Which keyword is used to access a static method or property from within the same class (rather than from a child)?

Answer :
  • self

 Which version of PHP introduced the static keyword?

Answer :
  • PHP 5