Course Content

  • 2. multi_level_inheritance

Course Content


Multiple inheritance is not supported by PHP, however it can be implemented by utilising Interfaces or Traits instead of classes. Traits (Combining Class and Traits): A trait is a special sort of class that allows for multiple inheritance.

Multilevel inheritance occurs when a class extends a class that extends another class. When, for example, class C extends class B and class B extends class A, this is referred to as multilevel inheritance.

A derived class inherits a base class in Multilevel inheritance, and the derived class also acts as the base class for subsequent classes. For example, consider the following three classes: A, B, and C, where class C is derived from class B and class B is derived from class A.

Definition. Single inheritance allows a derived class to inherit attributes and methods from a single parent class, whereas multiple inheritance allows a derived class to inherit attributes and methods from several parent classes.

Multiple Inheritance is the process of deriving a sub-class from multiple super classes. Numerous inheritance has the advantage of allowing a class to inherit the functionality of multiple base classes, allowing for the modelling of complicated relationships.

Recommended Courses

Share With Friend

Have a friend to whom you would want to share this course?

Download LearnVern App

App Preview Image
App QR Code Image
Code Scan or Download the app
Google Play Store
Apple App Store
598K+ Downloads
App Download Section Circle 1
4.57 Avg. Ratings
App Download Section Circle 2
15K+ Reviews
App Download Section Circle 3
  • Learn anywhere on the go
  • Get regular updates about your enrolled or new courses
  • Share content with your friends
  • Evaluate your progress through practice tests
  • No internet connection needed
  • Enroll for the webinar and join at the time of the webinar from anywhere