Solution to incomplete php dump: 1. Open the “php.ini” file; 2. Add “xdebug.var_display_max_children=128 xdebug.var_display_max_data=512 xdebug. var_display_max_depth=5”; 3. Restart the PHP service.
The operating environment of this tutorial: Windows 7 system, PHP version 8.1, Dell G3 computer.
What should I do if the php dump is incomplete?
Problem description:
var_dump is not fully displayed, and ellipses appear
We use the var_dump function of PHP to view the output results more intuitively , including details such as type, quantity, etc. This function displays structural information about one or more expressions, including the expression's type and value. Arrays will expand values recursively, showing their structure through indentation.
But during use, it was found that ellipses will appear when the array depth is high or the number of arrays is large. What is the reason?
It turns out that php's var_dump is a function after installing the module xdebug. This module can configure its display information parameters:
Solution:
In php In the xdebug node in .ini, add the configuration:
xdebug.var_display_max_children=128 xdebug.var_display_max_data=512 xdebug.var_display_max_depth=5
above The meaning is as intuitive as the code naming:
xdebug.var_display_max_children // 最多孩子节点数 xdebug.var_display_max_data// 最大字节数 xdebug.var_display_max_depth// 最大深度
Don’t forget to restart the PHP service..
Recommended learning: "PHP Video Tutorial"
The above is the detailed content of What to do if the php dump is incomplete. For more information, please follow other related articles on the PHP Chinese website!