What is Php Inheritance?
Inheritance represents the IS-A relationship, also known as parent-child relationship.
What is IS-A relationship?

In this image, Narendra Modi is a Prime Minister, Narendra Modi is a Son and Narendra Modi is a politician. so this is called Is a relationship.
Why use Inheritance?
(i) For Code Reusability.
(ii) For Method Overriding.
Note:-
(i) The subclass inherits all of the public and protected methods from the parent class.
(ii) If a class extends another, then the parent class must be declared before the child class structure.
Syntax:-
<?php
class childclass(or subclass) extends parentclass(or superclass)
{
}
?>
Example of Inheritance
<?php
class Empoyees {
public function officeTiming(){
echo 'Employee Office Timing is 10am to 7pm';
}
}
class generalManager extends Empoyees {
public function officeTiming(){
echo 'General Manager Office Timing is 10am to 5pm';
}
}
$gm_obj = new generalManager;
$gm_obj -> officeTiming();
?>
Type of Inheritance
(i) Single Inheritance
(ii) Multilevel Inheritance
(iii) Hierarchical Inheritance

two other inheritance used through Interface.
(iv) Multiple Inheritance
(v) Hybrid Inheritance
Why Multiple inheritance is not support Php language
Without Interface Multiple inheritance program

Multiple inheritance By Interface
This section is explained in the Interface section.
Php Inheritance – Interview Questions
Q 1: What is inheritance in PHP?
Q 2: Keyword used for inheritance?
Q 3: Can PHP support multiple inheritance?
Q 4: Can child class override methods?
Q 5: Why use inheritance?
Php Inheritance – Objective Questions (MCQs)
Q1. Inheritance allows a class to ______.
Q2. The class that inherits is called ______.
Q3. Which keyword is used for inheritance in PHP?
Q4. Private members of parent class are ______ accessible in child class.
Q5. Inheritance helps in ______.