Tudor is a techie turned manager who fights like mad to keep his tech skills honed and relevant. Everything from web hosting, networking, *nix and the like. Constantly developing and co-ordinating with others to make the web a better (and easier to use) place.
Wednesday, 9th Oct 2013 Posted @ 10:56
Having recently come across Kint, I have pretty much fallen in love with it.
Adding into your system is a matter of downloading it and then sticking it somewhere useful.
It is then invoked in my setup using:
if($stage=='development'){
$host = 'localhost';
require 'assets/php/kint/Kint.class.php';
}
I then place this at the end of my code:
if($stage=='development'){
// remove the $GLOBALS from the array
$arrays = array_diff(get_defined_vars(),array(array()));
Kint::dump($arrays);
// dump the other stuff
Kint::dump($_SERVER);
Kint::dump($_POST);
Kint::dump($_GET);
Kint::dump($_COOKIE);
Kint::dump($_FILES);
// show where I came from
Kint::trace();
}
This gives a nice, easy to read dump of all the stuff going on in my scripts - very nice :)