Are there pure virtual functions in PHP like with C++

前端 未结 4 1384
傲寒
傲寒 2021-02-13 06:45

I would have thought lots of people would have wondered whether this is possible but I can\'t find any duplicate questions... do correct me.

I just want to know whether

4条回答
  •  滥情空心
    2021-02-13 07:07

    Declare the method as abstract in the Parent class:

    abstract public function foo();
    

提交回复
热议问题