Stars: 2717
Forks: 294
Pull Requests: 99
Issues: 316
Watchers: 111
Last Updated: 2023-08-31 13:44:59
Kint - a powerful and modern PHP debugging tool.
License: MIT License
Languages: PHP, JavaScript, SCSS
At first glance Kint is just a pretty replacement for var_dump(), print_r() and debug_backtrace().
However, it's much, much more than that. You will eventually wonder how you developed without it.
One of the main goals of Kint is to be zero setup.
Download the file and simply
<?php
require 'kint.phar';
composer require kint-php/kint --dev
<?php
Kint::dump($GLOBALS, $_SERVER); // pass any number of parameters
d($GLOBALS, $_SERVER); // or simply use d() as a shorthand
Kint::trace(); // Debug backtrace
s($GLOBALS); // Basic output mode
~d($GLOBALS); // Text only output mode
Kint::$enabled_mode = false; // Disable kint
d('Get off my lawn!'); // Debugs no longer have any effect
Kint::$enabled_mode = false;
to turn it completely off.~d($var)
this call will output in plain text format.+d($var)
will disregard depth level limits and output everything.!d($var)
will expand the output automatically.-d($var)
will attempt to ob_clean
the previous output and flush after printing.~+d($var)
Kint\Parser\BlacklistPlugin::$shallow_blacklist[] = 'Psr\Container\ContainerInterface';
Kint\Renderer\RichRenderer::$folder = true;
Kint\Renderer\RichRenderer::$theme = 'theme.css';
. You can pass the absolute path to a CSS file, or use one of the built in themes:
original.css
(default)solarized.css
solarized-dark.css
aante-light.css
Jonathan Vollebregt (jnvsor)
Contributors
Licensed under the MIT License