search
HomeBackend DevelopmentPHP ProblemWhat should I do if the php var dump does not display completely?

Solution to the incomplete display of php var_dump: First find and open the php.ini file; then add the content as "xdebug.var_display_max_children=128..."; finally restart the apache service.

What should I do if the php var dump does not display completely?

The operating environment of this article: Windows 7 system, PHP version 7.1, DELL G3 computer

The var_dump() function output in PHP is incomplete 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: too many array elements No longer displayed, the string variable will only display the first N characters, and deeper array elements will also be displayed as ellipses.

This will cause some inconvenience, but we can modify the php.ini configuration file to solve this problem.

In the xdebug node in php.ini, add or modify the following parameters

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

Among them:

xdebug.var_display_max_children is the maximum number of elements allowed to be displayed in an array

xdebug.var_display_max_data is the maximum number of bytes a string variable is allowed to display

xdebug.var_display_max_depth is the maximum number of dimensions an array is allowed to display

Finally restart the apache service.

Recommended learning: "PHP Video Tutorial"

The above is the detailed content of What should I do if the php var dump does not display completely?. For more information, please follow other related articles on the PHP Chinese website!

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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!