late static binding in PHP
问题 I am reading the php manual about the LSB feature, I understand how it works in the static context, but I don't quite understand it in the non-static context. The example in the manual is this: <?php class A { private function foo() { echo "success!\n"; } public function test() { $this->foo(); static::foo(); } } class B extends A { /* foo() will be copied to B, hence its scope will still be A and * the call be successful */ } class C extends A { private function foo() { /* original method is