PHP method to get the list of constants, properties, and methods in a class

巴扎黑
Release: 2016-11-10 10:46:21
Original
1602 people have browsed it

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

Php code

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




source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template