I have a simple $_GET[]
query var set for showing testing data when pulling down queries from the DB.
<
The best what and easiest way to get nice var_dump is use xDebug (must have for any php dev) Debian way install
In console: apt-get install php-xdebug
after that you should open php.ini (depends on which stack you use) for it's /etc/php/7.0/fpm/php.ini
Search for display_errors
set same -> display_errors = On
Check html_errors
in same file a little bit below, it's also must be On
Save and exit
After open /etc/php/7.0/fpm/conf.d/20-xdebug.ini
And add to the end: ``` xdebug.cli_color=1
``` Save and exit.
A lot other available option and documentation for xdebug can be founded here.
https://xdebug.org/docs/
Good luck and Have Fun !!!
Result
Here's an alternative, actively maintained open source var_dump
on steroids:
https://github.com/kint-php/kint
It works with zero set up and has more features than Xdebug's var_dump.
Example which bypasses the dumped object size limit on the fly with Kint:
require 'kint.phar';
+d( $variable ); // append `+` to the dump call
Here's a screenshot: