It’s all very nice, but I didn’t get it!
—ALF (TV series)
This chapter is devoted to such a critical OOP mechanism as inheritance. Along with encapsulation and polymorphism, inheritance is one of the three pillars on which the knowledge of OOP rests. Next, you learn how inheritance is implemented in PHP.
Creating a Child Class
So, let’s say that you have a class that you would like to modify (add some new properties and methods to it). In principle, you ...