codemonster-ru / dumper
Simple and elegant PHP variable dumper for CLI and web environments
Installs: 23
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/codemonster-ru/dumper
Requires
- php: >=8.2
Requires (Dev)
- phpunit/phpunit: ^9.6 || ^10.5 || ^11.0 || ^12.0
This package is auto-updated.
Last update: 2025-10-17 14:04:30 UTC
README
A simple and elegant PHP variable dumper for both CLI and web environments.
๐ฆ Installation
Via Composer:
composer require codemonster-ru/dumper
๐ Usage
use Codemonster\Dumper\Dumper; // Automatically detects environment (CLI or HTML) Dumper::dump($value); // Force a specific mode Dumper::dump($value, 'cli'); Dumper::dump($value, 'html');
Dump and Die
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');
๐งช Testing
You can run tests with the command:
composer test