问题可能很简单,但我没有找到解决方案.
这是我的代码:
class foo { $text = "wordl\n"; protected function test() { echo $this->text; } } class foo2 extends foo { public function test() { echo "Hello,"; parent::test(); //Hmm ... I cant use parent::test() bcs in my case foo::test() require object data from $this } } $x = new foo2; $x->test();
foo :: test()方法被foo2 :: test()覆盖.是否可以调用foo :: test()形式foo2 :: test()?