Skip to content

Glossary: PHP Basics

inheritance

Also written: extends, extend, parent::

One class taking on the properties and methods of another with the keyword `extends`. `SaleProduct` extends `Product` and can replace its `label()` method, calling the original with `parent::label()`.

Where the book teaches it

Related terms

classmethod