Symfony 2. *中漂亮的转储变量/对象? [英] Pretty dump variable/object in Symfony 2.*?
本文介绍了Symfony 2. *中漂亮的转储变量/对象?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在开发东西时,我需要输出某个实例的状态以对其进行检查.
When developing stuff I need to output the state of some instance in order to inspect it.
使用CakePHP时,我总是有一个debug()函数,该函数在< pre>内执行某种var_dump. html元素,因此内容可读.
While using CakePHP I always had a debug() function which does some kind of var_dump inside a <pre> html element, so the content is readable.
Symfony 2.x中也有类似的东西吗?
Is something similar in Symfony 2.x too?
推荐答案
exit(\Doctrine\Common\Util\Debug::dump($someVar));
这篇关于Symfony 2. *中漂亮的转储变量/对象?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文