Home >Backend Development >PHP Tutorial >PHP method to get the list of constants, attributes, and methods in a class_PHP tutorial

PHP method to get the list of constants, attributes, and methods in a class_PHP tutorial

WBOY
WBOYOriginal
2016-07-21 15:46:59836browse

Copy code The code is as follows:

$r = new ReflectionClass($this);
Zend_Debug::dump($r- >getConstants(), "Constants");
Zend_Debug::dump($r->getProperties(), "Properties");
Zend_Debug::dump($r->getMethods(), "Methods");

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/320025.htmlTechArticleCopy the code as follows: $r = new ReflectionClass($this); Zend_Debug::dump($r-getConstants (), "Constants"); Zend_Debug::dump($r-getProperties(), "Properties"); Zend_Debug::dump($...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn