示例#1
0
    {
        $this->super();
    }
}
class Testing extends Object
{
    function real_method()
    {
        return 'real_method';
    }
    protected function protected_method()
    {
        return 'protected_method';
    }
}
Testing::extend('Whoa', 'Dude');
$t = new Testing();
$t->testing();
echo "\n";
$t->testing2();
echo "\n";
echo $t->testing2();
echo "\n";
echo $t->send('testing') . ' guy';
echo "\n";
echo $t->respond_to('real_method');
echo "\n";
echo $t->respond_to('testing');
echo "\n";
echo $t->respond_to('protected_method');
echo "\n";