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 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. Correct Answer Only i)

The abstract classes are the classes in which at least one method need to be abstract. Abstract classes in PHP are declared with the help of abstract keyword.

Related Questions

In factory method pattern, the framework must instantiate classes but it only knows about the abstract classes, which it cannot initiate. How would one solve this problem?