An instance of an abstract class can be created in PHP.

  • TRUE
  • FALSE
No, an instance of an abstract class cannot be created in PHP. Abstract classes are incomplete by nature and are intended to be extended by other classes. They serve as blueprints or templates for child classes. Abstract classes cannot be instantiated directly because they may contain abstract methods that need to be implemented in the child classes. Attempting to create an instance of an abstract class will result in a runtime error. To utilize the functionality of an abstract class, you need to create an instance of a concrete child class that extends the abstract class. To know more, refer to: http://php.net/manual/en/language.oop5.abstract.php
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *