是否有内置功能可以打印对象的所有当前属性和值?

a 夏天 提交于 2020-08-16 11:27:28

问题:

So what I'm looking for here is something like PHP's print_r function. 所以我在这里寻找的是类似PHP的print_r函数。 This is so I can debug my scripts by seeing what's the state of the object in question. 这样一来,我可以通过查看问题对象的状态来调试脚本。


解决方案:

参考一: https://stackoom.com/question/nyX/是否有内置功能可以打印对象的所有当前属性和值
参考二: https://oldbug.net/q/nyX/Is-there-a-built-in-function-to-print-all-the-current-properties-and-values-of-an-object
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!