See the second section of the video on the 17th day of the Inheritance of class
So inheritance between classes is the creation of a new relationship, not the duplication of things from the parent class to subclasses---------------------
When you instantiate a class, call its method, first look at its own class there is no such method, if not found, to see whether the class has inherited the relationship, Eurasia is an inherited relationship, to find his father or above the class, if in his service or above the class found this method, This method will be implemented on this object.
But if you encounter a function like the name of the parent, this is called rewriting, but I think this is a new method definition, you see the steps to instantiate a class and implement the method, is to find their own, if they do not, and then to find the parent class, so, people in their own found, then directly use Ah, You don't have to look for a parent class at all.
Similarly, the property rewrite is also like this, is to see if your class has this attribute, if there is, directly use, if not go to the parent class there or above the class to find, eh,
() PHP, class inheritance