PHP Multiple Inheritance with Interfaces

后端 未结 5 1267
醉话见心
醉话见心 2020-12-14 19:39

I\'m trying to understand how using interfaces gives me multiple inheritance as I\'ve been googling.

class A
{
 function do1(){}
 function do2(){}
 function          


        
5条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-14 19:57

    Multiple inheritance is not possible in PHP like in many OOP supported languages

    See similar topic here. The topic is in AS3 but gives you answer.

    To answer particularly about solving using interfaces is answered in the same post here

    Hope this helps

提交回复
热议问题