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 akyazı escort arifiye escort erenler escort eve gelen escort ferizli escort geyve escort hendek escort otele gelen escort sapanca escort söğütlü escort taraklı escort
sakarya escort - akyazı escort - arifiye escort - erenler escort - eve gelen escort - ferizli escort - geyve escort - hendek escort - karapürçek escort - karasu escort - kaynarca escort - kocaali escort - otele gelen escort - pamukova escort - sapanca escort - söğütlü escort - taraklı escort
sapanca escort hendek escort karasu escort escort sakarya sakarya escort bayan adapazarı escort sakarya escort sakarya escort sakarya escort sakarya escort sakarya escort sakarya escort