Skip to content

bohmm/php-dumper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP dumper

A simple tool for displaying pretty, colorful and clear formatted PHP variables.

Banner

supported types: null boolean integer float string array object closure resource

Install

easy installation via composer

composer require --dev bohmm/php-dumper

Usage

Using PHP dumper is easy. Enter a variable as the first parameter in the constructor. PHP dumper allows two display modes default or inline, which can be set using the second parameter (false = default, true = inline).

default usage:

require __DIR__ . '/path/to/autoload.php';

$variable = 'hello world';

# display default mode
$dumper = new \Bohmm\PhpDumper\Dumper($variable);
echo $dumper->dump();

# display inline mode
$dumper = new \Bohmm\PhpDumper\Dumper($variable, true);
echo $dumper->dump();

or via helper functions dump or ddump:

require __DIR__ . '/path/to/autoload.php';

$variable = 'hello world';

# display the variable (default or inline mode)
dump($variable);
dump($variable, true);

# display the variable and terminate other scripts (default or inline mode)
ddump($variable);
ddump($variable, true);

Disclaimer

This software is provided "as is", without any warranty of any kind, and is used at the user's own risk. The author assumes no liability for damages resulting from the use or misuse of this package.

License

PHP dumper is provided under the MIT license.

About

A simple tool for displaying pretty, colorful and clear formatted PHP variables.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages