Why we are use to Multipal Inheritance in php? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Why we are use to Multipal Inheritance in php?

7th Jul 2020, 5:35 PM
Ramniwas Kumawat
Ramniwas Kumawat - avatar
2 Answers
+ 1
Your question is not clear. Are you talking about how to inherit from multiple classes? Well. It is not possible. In PHP 7, you can use traits to achieve this functionality. trait Trait1 { //methods go here } trait Trait2 { //methods go here } class MyClass { use Trait1; use Trait2; //class functionality goes here }
7th Jul 2020, 5:40 PM
Ore
Ore - avatar