How xdebug changes var_dump

Aug 25, 2020 PHP xdebug var_dump

Thing you want to do

The var_dump display changed after installing xdebug. I checked specifically how it would change.

#Environment (including items not related to this work)

Implementation

$test = ['a' =>'apple','b' =>'bed','c' => ['cat','cookie']];
var_dump($test);

Browser display when xdebug is not set

All are displayed in one line. It’s hard to see. image.png

Browser display when xdebug is set

image.png

Supplement

Since uninstalling xdebug was a hassle, I set the following and checked.

xdebug.overload_var_dump = 0

#Remarks It may be more efficient if you set xdebug.

#Reference There are many other things you can do by looking at the manual settings. https://xdebug.org/docs/all_settings