Translations:Developers/Object oriented programming in PHP/Classes/19/en


 * One class can extend only one parent class. It is not possible for a class to inherit from multiple parent classes.
 * Methods passed on to subclasses and overridden by them must have the same visibility scope (public or protected) like in parent classes.
 * In a class all public / protected properties / methods of the superclasses are visible, i.e. can be used in the subclass without having to define them again. Also all own properties / methods including the ones declared as private are visible, but of course must be defined first.
 * With the :: operator (scope resolution operator or double colon) it's possible to access overridden methods of non-direct superclasses in class definitions:.
 * parent:: refers to methods of the direct parent class:.
 * Constants and static methods / properties can be called also using the :: operator:  or  . The keywords self::</tt> and parent::</tt> are available, too. But parent::</tt> should be avoided in this context.