dev-master
9999999-devA pretty variable dumper for HTML & cli
GPL
The Development Requires
by Renaud LITTOLFF
Wallogit.com
2017 © Pedro Peláez
A pretty variable dumper for HTML & cli
A pretty variable dumper for HTML & cli., (*1)
{
"require": {
"marmotz/dumper": "dev-master"
}
}
In most of the cases you don't need Dumper in your production environment., (*3)
{
"require-dev": {
"marmotz/dumper": "dev-master"
}
}
Include composer autoloader in your project and use dump() function., (*4)
require_once __DIR__ . '/vendor/autoload.php'; dump($_SERVER);
You can limit the depth of the dump by using setMaxLevelOfRecursion function like this:, (*5)
Marmotz\Dumper\Dump::setMaxLevelOfRecursion(5);
Dumper self-determines output type between HTML and cli., (*6)
With following code:, (*7)
<?php
require_once __DIR__ . '/vendor/autoload.php';
$array = array(
1, 2, fopen(__FILE__, 'r'),
uniqid() => array(
4,
array(
uniqid() => 5, 'foobar'
),
7
),
8 => new stdClass
);
dump($array, new DateTime);
Here is an example of cli output: http://asciinema.org/a/5706, (*8)
Here is an example of HTML output:, (*9)
, (*10)
A pretty variable dumper for HTML & cli
GPL