marcocesarato / dumper
This class displays structured information about one or more expressions that includes its type and value. Arrays and objects are explored recursively with values indented to show structure.
Requires
- php: >=5.6
- ext-json: *
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.15
- phpunit/phpunit: ^5.0
This package is auto-updated.
Last update: 2024-11-30 01:40:02 UTC
README
Version: 1.0.0.8
Github: https://github.com/marcocesarato/PHP-Dumper
Author: Marco Cesarato
Description
This class can display a formatted version of variable values.
It can take the values of one or more variables and generates a string that displays the variable values in a readable format.
Arrays and objects can be traversed recursively to display its member values.
The class can either return a string with the formatted variable values, display it to the current page or even exit the current script.
Requirements
- php 5.6+
Install
Composer
- Install composer
- Type
composer require marcocesarato/dumper
- Enjoy
Usage
use marcocesarato\dumper\Dumper; $arr = [1,2,3,4,5]; $dump = Dumper::get($arr, $arr /* , ... */); // Get string of dump Dumper::out($arr /* , ... */); // Print Dumper::fatal($arr /* , ... */); // Print and die