[OOP] 02 - Inheritance
constructor
- constructor function: magic function
- function automatically gets called when a new object gets created
- the constructor variables of a class can be set
- when creating a new object
inheritance
- a new class may be defined by
extends
using an existing class- all functions including the constructor function get inherited by the new extended class
function overriding
- if new constructor is specified in the extended class, the constructor from the parent gets overridden