Smart and feature rich PHP data inspector.

0 stars out of 5

0 0 0 0 0
  • Author Taufik Nurrohman
  • Link External URL
  • Maintainer 1
  • Member
  • Version 1.0.0

Mecha already has a built-in function called test() to perform simple data inspections returned by PHP expressions. This extension provides a more useful and complete inspection function by using the global kint() function.


The way you use it is exactly the same as you would use the test() function, so it will be easier for you to refactor your existing code if you want to use this extension in the long run. It is a good practice to always call this function within a non-production mode conditional statement, so that this function will not be executed when you are already in production mode:

if (defined('TEST') && TEST) {
    if (function_exists('kint')) {
        kint($_COOKIE, $_ENV, $_FILES, $_GET, $_POST, $_REQUEST, $_SERVER);
    } else {
        test($_COOKIE, $_ENV, $_FILES, $_GET, $_POST, $_REQUEST, $_SERVER);

I really recommend you to install this extension if you want to develop Panel features on your own. By using this extension, the Panel data inspection results will look very neat and tidy:

Hook::set('_', function ($_) {
    kint($_, $_GET, $_POST, $_SESSION, $_SERVER);
}, 1000); // Execute as late as possible…


No comments yet.