Abstract Or Not

../_images/abstract_or_not.png

A parent method must have a compatible signature with the same method in any child.

The only exception are constructor, __construct, which are not required to keep the signature compatible between parent and child.

This exception to the rule may be explicitly enforced by making the constructor abstract, or by setting the constructor in an interface: in fact, methods in an interface are considered abstract by default.

See Also

PHP Error Messages

PHP Features