Multilevel and Multiple Inheritance in PHP

Multilevel and Multiple Inheritance in PHP

Multilevel and Multiple Inheritance in PHP :

PHP OOP does not allow multiple inheritance, it allow only multilevel inheritance.

In simple word, subclass can not extend more than one super class.
But PHP allow hierarchical inheritance, Hierarchical inheritance means child can get property of their parent and parent can get property of grand parent, so in this way child can get also some property of their grand parent.

Best example of multiple inheritance in PHP

Above code will not work in php because php does not allow multiple inheritance.

Best example of multilevel inheritance in PHP

Above example is so clear to understand, child class is extending parent class and parent class is extending grand parent.This was a very basic example to understand the concept of multilevel inheritance in php oops.

Phone: (+91) 8800417876
Noida, 201301
sakarya escort sakarya escort sakarya escort sakarya escort serdivan escort izmir escort eporner
akyazı escort sakarya escort ferizli escort sakarya escort geyve escort sakarya escort hendek escort sakarya escort karasu escort sakarya escort sapanca escort serdivan escort webmaster forum
pendik escort atasehir escort