A simple and elegant PHP variable dumper for both CLI and web environments.
Via Composer:
composer require codemonster-ru/dumperuse Codemonster\Dumper\Dumper;
// Automatically detects environment (CLI or HTML)
Dumper::dump($value);
// Force a specific mode
Dumper::dump($value, 'cli');
Dumper::dump($value, 'html');If you want to dump a value and immediately stop script execution:
use Codemonster\Dumper\Dumper;
// Dump a single value and exit
Dumper::dd($user);
// Dump multiple values
Dumper::dd($request, $response);
// Force HTML or CLI mode explicitly
Dumper::dd($data, 'html');
Dumper::dd($data, 'cli');You can run tests with the command:
composer test