After xdebug is installed in php, var_dump () cannot input variable content. solution:

Source: Internet
Author: User
Tags php development environment
Someone asked why var_dump () cannot input the variable content after php installs xdebug. the variables in it are directly output rather than output the content in the variable, next we just need to configure xdebug to solve the problem.

Someone asked why var_dump () cannot input the variable content after php installs xdebug. the variables in it are directly output rather than output the content in the variable, next we just need to configure xdebug to solve the problem.

In the php development environment, after the xdebug module is installed, 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 are not displayed. string variables only display the first N characters, and deeper array elements are also displayed as ellipsis. This may cause some inconvenience. modify the configuration file and set these parameters. add the following to the xdebug node in php. ini:

  1. Xdebug. var_display_max_children = 128
  2. Xdebug. var_display_max_data = 512
  3. Xdebug. var_display_max_depth = 5

The details are as follows: xdebug. var_display_max_children = 128. the parameter type is integer. the default value is 128. The maximum number of object attributes is displayed.

Xdebug. var_display_max_data = 512, parameter type integer, default value: 512, display maximum data length

Xdebug. var_display_max_depth = 3, parameter type integer, default value: 3, display maximum nested level

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.