toggle menu

PHP is a single inheritance language ?

Mukund verma |23 Mar at 01:03

  • 0 like
  • 1 comment
  • 7 attempts

Govind Ramchander31 Mar at 07:03

Yes PHP is a single inheritance language

Single inheritance enables a derived class to inherit behavior and properties from a single parent class. It allows a derived class to inherit the properties and behavior of a base class, thus enabling code reusability as well as adding new features to the existing code. This makes the code much more elegant and less repetitive. Inheritance is one of the key features of object-oriented programming (OOP).

Single inheritance is safer than multiple inheritance if it is approached in the right way. It also enables a derived class to call the parent class implementation for a specific method if this method is overridden in the derived class or the parent class constructor.

Asked:

23 Mar at 01:03

Viewed:

1094 times

Active:

20 Apr at 05:04