
Class inheritanceenables you to describe a parent-child relationshipbetween classes. For example, you might have a base class
Shapefrom which both Squareand Circlederive. However,
you might often want to add additional “interfaces” to classes,
basically meaning additional
contracts to whichthe class must adhere. This is achieved in C++ by using multiple
inheritance and deriving from two classes. PHP chose interfaces
as...