繁体中文
设为首页
加入收藏
当前位置:PHP技术首页 >> PHP基础 >> PHP从映象(Reflection)类中读取属性信息

PHP从映象(Reflection)类中读取属性信息

2004-12-15 08:00:00  作者:  来源:互联网  浏览次数:0  文字大小:【】【】【
简介:getMethods();//取得类中所有的名字 //$arr = $obj->getMethod('Calendar');//取得指定类的名字 //$arr = ReflectionClass::getMethod('myCal'); print_r($arr); //Reflection::export(new ReflectionClass('Ref...

getMethods();//取得类中所有的名字

//$arr = $obj->getMethod('Calendar');//取得指定类的名字

//$arr = ReflectionClass::getMethod('myCal');

print_r($arr);

//Reflection::export(new ReflectionClass('ReflectionClass'));//通过此方法可以看到ReflectionClass中所有的属性和方法

?>

责任编辑:admin
相关文章