合规国际互联网加速 OSASE为企业客户提供高速稳定SD-WAN国际加速解决方案。 广告
**一.继承规则不适用于Final Private方法** ``` class Foo { final private function testFoo(){} } class ChildFoo extends Foo{ private function testFoo(){ echo 123; } public function show(){ $this->testFoo(); } } $obj=new ChildFoo; $obj->show(); ```   **二.继承规则不适用于Static Private方法** ``` class Foo { static private function testFoo(){} } class User extends Foo{ public function testFoo(){ echo 123; } } $obj=new User; $obj->testFoo(); ```   **三.父类Private方法在子类中可出现同名抽象化方法** ``` class Foo { private function testFoo(){} } abstract class User extends Foo{ abstract function testFoo(); } class Person extends User{ public function testFoo(){ echo 123; } } $obj=new Person; $obj->testFoo(); ```