Home > Backend Development > PHP Problem > What to do if the php dump is incomplete

What to do if the php dump is incomplete

藏色散人
Release: 2023-03-17 09:52:02
Original
1352 people have browsed it

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.

What to do if the php dump is incomplete

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
Copy after login

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// 最大深度
Copy after login

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!

Related labels:
php
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template