http://raveren.github.com/kint/
Kint for PHP is a powerful and modern, zero-setup replacement for var_dump(), print_r() and debug_backtrace(). You'll wonder how you developed without it.
<?php
require '/kint/Kint.class.php';
########## DUMP VARIABLE ###########################
Kint::dump($GLOBALS, $_SERVER); // any nuber of parameters
// or simply use d() as a shorthand:
d($_SERVER);
########## DEBUG BACKTRACE #########################
Kint::trace();
// or via shorthand:
d(1);
########## TEXT-ONLY OUTPUT ########################
s($GLOBALS);
########## MISCELLANEOUS ###########################
// to disable all output
Kint::enabled(false);
// further calls, this one included, will not yield any output
d('Get off my lawn!'); // no effect
sd()
anddd()
are shorthands fors();die;
andd();die;
respectively.!Kint::dump()
and!dd()
will display the dump expanded by default.
Visit the project page for documentation, configuration, and more advanced usage examples.
Rokas Šleinius (Raveren)