Loading…

What is Inheritance?

It is a technique in which one class acquires the property of another class. With the help of inheritance, we can reuse the fields and methods of the existing class.

Inheritance has three type, are given below.

  • Single inheritance
  • Multiple inheritance
  • Multi level inheritance

But PHP supports only single inheritance, where only one class can be derived from single parent class. We can also use multiple inheritance by using interfaces.

Suggest An Answer

No suggestions avaliable!

Latest post from oops interview questions

Ask Question