Vidyalelo
PHP · all questions

Object Oriented Concept
practice.

Practice every MCQ with options. Use Show answers when you want the correct option and solution.

141

Questions

2/8

Page

Pick an option on a question to see the right answer and solution.

What does PDO stand for?

Select an option to see the answer and solution.

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

Select an option to see the answer and solution.

Which keyword is used to declare a constant property?

Select an option to see the answer and solution.

Which one of the following is a constant variable?

Select an option to see the answer and solution.

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

Select an option to see the answer and solution.

How many of the following can be contained in constants? 1. boolean 2. integer 3. float 4. string

Select an option to see the answer and solution.

Which one of the following class can not be instantiated?

Select an option to see the answer and solution.

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

Select an option to see the answer and solution.

Which one of the following is the correct abstract method?

Select an option to see the answer and solution.

Atleast how many abstract methods must an abstract class contain?

Select an option to see the answer and solution.

Which one of the following keyword is used to implement an interface?

Select an option to see the answer and solution.

Which version of PHP introduced the concept called late static binding?

Select an option to see the answer and solution.

Which one of the following methods in the exception class, is used to get a nested exception object?

Select an option to see the answer and solution.

Which one of the following keyword is used in conjunction with an Exception object?

Select an option to see the answer and solution.

Which keyword is used to put a stop on inheritance?

Select an option to see the answer and solution.

PHP provides built-in interceptor methods, which can intercept messages sent to undefined methods and properties. This is also known as _________

Select an option to see the answer and solution.

Which one of the following method is invoked when a value is assigned to an undefined property?

Select an option to see the answer and solution.

Which one of the following method is invoked when an undefined method is called by client code?

Select an option to see the answer and solution.

Which method introduced in PHP 5, is invoked just before an object is garbage collected?

Select an option to see the answer and solution.

Which one of the following statements is true ?
class CopyMe {}
$first = new CopyMe();
first;

Select an option to see the answer and solution.