What's the equivalent of virtual functions of c++ in PHP?

后端 未结 3 1753
夕颜
夕颜 2021-02-15 00:59

Is it abstract function xxx?

I just made a test which seems to indicate a private method to be virtual too?

class a {
 private function test         


        
3条回答
  •  野趣味
    野趣味 (楼主)
    2021-02-15 01:17

    use static keyword (php 5.4) not $this->meth() but static::meth()

提交回复
热议问题