In PHP OOP, an instance of an abstract class cannot be ______.

  • created
  • inherited
  • accessed
  • instantiated
An instance of an abstract class cannot be instantiated in PHP OOP. This is because an abstract class is incomplete and serves as a blueprint or template for other classes. Abstract classes can only be inherited by child classes, which must provide implementations for the abstract methods. Attempting to instantiate an abstract class directly 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 *