Пример #1
0
}
class c extends p
{
    public function cf()
    {
        parent::pf();
        parent::cc();
        $this->cc();
    }
    public function cc()
    {
        echo 'in c-cc<br/>';
    }
}
$c = new c();
$c->cf();
/*
in p-pf
in p-pp
in o -cc
in c-cc
*/
//父类中static变量,被子类继承。且共享。
class MyParent
{
    protected static $variable;
}
class Child1 extends MyParent
{
    function set()
    {