A single inheritance occurs when a class inherits from another class. The Dog class inherits the Animal class in the example below, so there is only one inheritance.
Only single inheritance is supported in PHP, which means that only one class can be derived from a single parent class. Using interfaces, we can mimic multiple inheritance.
You can create code in the parent class and utilise it in both the parent and child classes thanks to inheritance. A base class or super class is another name for the parent class. A derived class or a subclass is also referred to as a child class. The extends keyword is used to specify that a class inherits from another class.