var_dump not showing with style with PHP 7.3 and xdebug

899 views Asked by At

I was using PHP 5.3 for my project in my mac machine(OS: Mac Big sur). I have upgraded to PHP 7.3 using brew 2 days back. Since then the var_dump() function showing as simple string instead of the styles one which I was getting with PHP 5.3.

I have installed xdebug as per some online suggestions. Still the same display getting

Is there any way to make var_dump() looks good?

When I try php -v, I am getting the below result which showing xdebug is installed.

enter image description here

1

There are 1 answers

0
karololszak On
  1. If you're using a web server (i.e. you are not developing a php cli script), check that you've installed xdebug not only for php-cli, but also for eg. php-fpm; you can validate that by using phpinfo() and searching for xdebug in the output.
  2. Check xdebug display options and try adding xdebug.cli_color = 2 to your .ini file: