What type of inheritance that php supports

Showing Answers 1 - 48 of 48 Answers

Vijaya

  • Nov 14th, 2007
 

PHP Supports single inheritance.

PHP support the Multilevel inheritance Not a multiple inheritance.

For Example:

class A{

function hello();
}

// This is possible.
class B extends A{

function helloB();
}

// This is not possible, IT gives the fatal error.
class C extends A{

function helloC();
}

Ashish Shah

  • Jul 3rd, 2015
 

Not multiple inheritance. PHP supports single inheritance and multi-level inheritance

  Was this answer useful?  Yes

Sandip

  • Aug 26th, 2015
 

Give me example multiple inheritance

  Was this answer useful?  Yes

Abhishek

  • Sep 10th, 2015
 

Single inheritance

  Was this answer useful?  Yes

charujain

  • Sep 15th, 2015
 

PHP supports single inheritance and multilevel inheritance

  Was this answer useful?  Yes

riya

  • Dec 22nd, 2015
 

PHP supports only single inheritance.

  Was this answer useful?  Yes

Roseline.B

  • Feb 16th, 2016
 

PHP does not support multiple inheritance.
It supports single, multilevel, hierarchical inheritance.

  Was this answer useful?  Yes

brij

  • Mar 3rd, 2016
 

It supports single inheritance & multilevel inheritance in PHP

  Was this answer useful?  Yes

ketan mahajan

  • May 4th, 2016
 

PHP does not support multiple inheritance.
It supports single, multilevel, hierarchical inheritance.
But now php achieve multiple inheritance using trait concept of php.

  Was this answer useful?  Yes

Chari

  • Dec 7th, 2017
 

Inheritances are 4type, 1) single Inheritance, 2) Multiple Inheritance, 3) Multi level Inheritance, 4) Hybrid Inheritance.
PHP will supoort only Single, Multi level, and Hybrid.
Multiple Inheritance is not supported by PHP

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions