Home >Backend Development >PHP Tutorial >php如何打印对象的所有属性

php如何打印对象的所有属性

WBOY
WBOYOriginal
2016-06-06 20:41:253029browse

有时候在写模块的时候,需要知道可以用哪些属性,怎么样打印出目前该对象拥有的属性?

回复内容:

有时候在写模块的时候,需要知道可以用哪些属性,怎么样打印出目前该对象拥有的属性?

这个?

http://php.net/manual/zh/function.get-object-vars.php
http://php.net/manual/zh/function.get-class-methods.php
http://php.net/manual/zh/function.get-class-vars.php

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