var_dump()输出缩短 - phpunit还是我的终端?

时间:2013-01-08 18:58:38

标签: php terminal phpunit var-dump

我在phpunit中编写测试,偶尔我要做一个

var_dump($this->getRequest()->getBody())

这一切都很好,花花公子,但在我做的时候在终端:

phpunit application/modules/account/ContactControllerTest.php

我得到了输出:

string(2319) "<!DOCTYPE html><!--[if lt IE 7]><html class="no-js lt-ie9 lt-ie8 lt-ie7"><![endif]--><!--[if IE 7]><html class="no-js lt-ie9 lt-ie8"><![endif]--><!--[if IE 8]><html class="no-js lt-ie9"><![endif]--><!--[if gt IE 8]><!--><html class="no-js"><!--<![endif]--><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" ><meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0" ><meta name="apple-mobile-web-app-capable" content="yes" "...
...

这不是2319个字符....它更像是516 ....其余的内容在哪里?是的,我的终端打开了无限滚动。

1 个答案:

答案 0 :(得分:1)

您正在寻找的是:

xdebug.var_display_max_data

  

类型:整数,默认值:512

     

控制使用xdebug_var_dump(),xdebug.show_local_vars或通过函数跟踪显示变量时显示的最大字符串长度

如果您将该设置更改为-1,您将获得完整的转储。