PHP code example of voku / kint
1. Go to this page and download the library: Download voku/kint library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
voku / kint example snippets
use kint\Kint;
Kint::enabled(true);
########## DUMP VARIABLE ###########################
Kint::dump($GLOBALS, $_SERVER); // pass any number of parameters
// or simply use d() as a shorthand:
\kint\d($_SERVER);
########## DEBUG BACKTRACE #########################
Kint::trace();
// or via shorthand:
\kint\d(1);
############# BASIC OUTPUT #########################
# this will show a basic javascript-free display
\kint\s($GLOBALS);
########## MISCELLANEOUS ###########################
# this will disable kint completely
Kint::enabled(false);
\kint\dd('Get off my lawn!'); // no effect
Kint::enabled(true);
\kint\dd( 'this line will stop the execution flow because Kint was just re-enabled above!' );