当前位置:首页 > PHP教程 > PHP常见问题

PHP获取类中常量,属性,及方法列表的方法

复制代码 代码如下:

$r = new reflectionclass($this);
zend_debug::dump($r->getconstants(), "constants");
zend_debug::dump($r->getproperties(), "properties");
zend_debug::dump($r->getmethods(), "methods");

【说明】本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:)!