예제 #1
0
        echo "Accessing X from D:\n";
        var_dump(get_class_methods("X"));
    }
}
class X
{
    private function privX()
    {
    }
    protected function protX()
    {
    }
    public function pubX()
    {
    }
    public static function testFromX()
    {
        echo "Accessing C from X:\n";
        var_dump(get_class_methods("C"));
        echo "Accessing D from X:\n";
        var_dump(get_class_methods("D"));
        echo "Accessing X from X:\n";
        var_dump(get_class_methods("X"));
    }
}
echo "Accessing D from global scope:\n";
var_dump(get_class_methods("D"));
C::testFromC();
D::testFromD();
X::testFromX();
echo "Done";