[OOP]: Object-oriented programming: Inheritance

Posted on 2015-08-18 10:13:36

Inheritance syntax

When you extend a class, subclass inherits all of the superclass method except of course the properties or methods are declared with the keyword private.

Note: When you write the superclass you want to later extend to the subclasses may inherit, then you should not declare the properties or methods by keyword private . You can see more about OOP - PHP at here