spiral / dumper
Colorful variable dumper
2.14.1
2022-09-01 21:12 UTC
Requires
- php: >=7.4
- codedungeon/php-cli-colors: ^1.11
- psr/log: 1 - 3
Requires (Dev)
- phpunit/phpunit: ^8.5|^9.5
- dev-master / 2.15.x-dev
- 2.14.1
- 2.14.0
- 2.13.1
- 2.13.0
- 2.12.0
- 2.11.0
- 2.10.1
- 2.10.0
- 2.9.x-dev
- 2.9.1
- 2.9.0
- 2.8.x-dev
- v2.8.12
- v2.8.10
- v2.8.9
- v2.8.8
- v2.8.7
- v2.8.5
- v2.8.4
- v2.8.2
- v2.8.1
- v2.8.0
- 2.7.x-dev
- v2.7.9
- v2.7.8
- v2.7.7
- v2.7.6
- v2.7.5
- v2.7.4
- v2.7.3
- 2.7.2
- 2.7.1
- 2.7.0
- v2.6.3
- v2.6.2
- v2.6.1
- v2.6.0
- v1.1.7
- v1.1.6
- v1.1.5
- v1.1.4
- v1.1.3
- v1.1.2
- v1.1.1
- v1.1.0
- v1.0.2
- v1.0.1
- v1.0.0
- dev-feature/attributes
This package is auto-updated.
Last update: 2023-03-12 16:14:24 UTC
README
Dumper provides the ability to display the content of any given variable or object in a human readable form. Component support dumping into various outputs such as STDOUT, STDERR or log. Component support CLI colorization.
Usage
Installation:
$ composer require spiral/dumper
In your code (works in web and cli SAPIs):
use Spiral\Debug; $d = new Debug\Dumper(); $d->dump($variable);
Dump to Log:
use Spiral\Debug; $d = new Debug\Dumper($loggerInterface); $d->dump($variable, Debug\Dumper::LOGGER);
Dump to STDERR:
use Spiral\Debug; $d = new Debug\Dumper($loggerInterface); $d->dump($variable, Debug\Dumper::STDERR);
Force dump to STDERR with color support:
use Spiral\Debug; $d = new Debug\Dumper($loggerInterface); $d->setRenderer(Debug\Dumper::STDERR, new Debug\Renderer\ConsoleRenderer()); $d->dump($variable, Debug\Dumper::STDERR);
Notes
- component does not dump @internal properties
- use
__debugInfo()
to specify custom set of data to display
License
The MIT License (MIT). Please see LICENSE
for more information. Maintained by SpiralScout.