Home >Backend Development >PHP Tutorial >Solution to the problem that var_dump() cannot input variable content after installing xdebug in PHP_PHP Tutorial

Solution to the problem that var_dump() cannot input variable content after installing xdebug in PHP_PHP Tutorial

WBOY
WBOYOriginal
2016-07-13 10:42:43955browse

Someone asked why var_dump() cannot input variable contents after PHP installs xdebug. The variables inside are output directly instead of outputting the contents of the variables. Now we only need to simply configure xdebug to solve the problem.

In the PHP development environment, after installing the xdebug module, the output results of var_dump() will be easier to view, but by default, the output results of var_dump() will change: excessive array elements will no longer be displayed. String variables will only display the first N characters, and deeper array elements will also be displayed as ellipses. This will cause some inconvenience. We modify the configuration file and set these.

In the xdebug node in php.ini, add the following

xdebug.var_display_max_children=128
xdebug.var_display_max_data=512
xdebug.var_display_max_depth=5

The detailed introduction is as follows, among which


xdebug.var_display_max_children = 128


Parameter type integer, default value is 128


Displays the maximum number of object attributes. The extra ones will not be displayed

xdebug.var_display_max_data = 512


Parameter type integer, default value 512
Maximum length of displayed data

xdebug.var_display_max_depth = 3

Rigel type integer, the default value is 3
Display the maximum number of nesting levels

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/633217.htmlTechArticleSomeone asked why var_dump() cannot input variable content after PHP installs xdebug. The variables inside are output directly. Instead of outputting the contents of the variable, we just need to simply configure it...
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