a) _call b) __invoke c) __wakeup d) _unset Answer: a Explanation: When a class implements __call(), then an object ...
View QuestionWhich feature allows us to call more than one method or function of the class in single instruction?
a) Typecasting b) Method Including c) Method adding d) Method chaining Answer: d Explanation: When many methods are called ...
View QuestionWhich method is used to tweak an object’s cloning behavior?
a) clone() b) _clone() c) _clone d) object_clone() Answer: b Explanation: A copy of an object is ...
View QuestionIf your object must inherit behavior from a number of sources you must use a/an
a) Interface b) Object c) Abstract class d) Static class Answer: a Explanation: An interface in PHP ...
View QuestionIf one intends to create a model that will be assumed by a number of closely related objects, which class must be used?
a) Normal class b) Static class c) Abstract class d) Interface Answer: c Explanation: The abstract classes ...
View Question
Which of the following is/are true for an abstract class?
i) Abstract classes in PHP are declared with the help of abstract keyword.
ii) A class is declare abstract by using the keyword implements.
iii) It is a class that really isn’t supposed to ever be instantiated but instead serves as a base class.
iv) Attempting to instantiate an abstract class results in an error.
Which of the following is/are true for an abstract class? i) Abstract classes in PHP are declared with the ...
View Question
The class from which the child class inherits is called ________
i) Child class
ii) Parent class
iii) Super class
iv) Base class
The class from which the child class inherits is called ________ i) Child class ii) Parent class iii) Super class iv) Base ...
View QuestionWhich one of the following is the right way to clone an object?
a) clone(targetObject); b) destinationObject = clone targetObject; c) destinationObject = _clone(targetObject); d) destinationObject = clone(targetObject); Answer: b Explanation: You ...
View QuestionWhich version of PHP introduced the advanced concepts of OOP?
a) PHP 4 b) PHP 5 c) PHP 5.3 d) PHP 6 Answer: b Explanation: ...
View Question
Which of the following advanced OOP features is/are not supported by PHP?
i) Method overloading
ii) Multiple Inheritance
iii) Namespaces
iv) Object Cloning
Which of the following advanced OOP features is/are not supported by PHP? i) Method overloading ii) Multiple Inheritance iii) Namespaces iv) Object ...
View Question