Last active
October 2, 2021 14:36
-
-
Save raveren/eba373d8abb572b0528c73d145103f95 to your computer and use it in GitHub Desktop.
Config file for Kint (php debug helper). More info: https://kint-php.github.io/kint/settings/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // hide the fold on the bottom of the page and just display Kint where it was called. | |
| \Kint\Renderer\RichRenderer::$folder = false; | |
| // next line requires PhpStorm with https://plugins.jetbrains.com/plugin/6027-remote-call plugin | |
| \Kint\Kint::$file_link_format = 'http://localhost:8091/?message=%f:%l'; | |
| if (!\function_exists('kd')) { | |
| /** | |
| * Alias of Kint::dump(); die; is compatible with symfony & laravel (it leaves their dd helper alone) | |
| */ | |
| function kd() | |
| { | |
| $args = \func_get_args(); | |
| \call_user_func_array(array('\Kint', 'dump'), $args); | |
| die; | |
| } | |
| Kint::$aliases[] = 'kd'; | |
| } | |
| if (!\function_exists('sd')) { | |
| /** | |
| * Alias of kd(), just outputs plain htmlescaped text. | |
| */ | |
| function sd() | |
| { | |
| $args = \func_get_args(); | |
| \call_user_func_array('s', $args); | |
| die; | |
| } | |
| Kint::$aliases[] = 'sd'; | |
| } | |
| if (!\function_exists('ssd')) { | |
| /** | |
| * Alias of kd(), just returns simple text, no escapes, new lines are \n. | |
| * | |
| * Useful for cli when autodetection fails, logfiles and RESTful requests. | |
| */ | |
| function ssd() | |
| { | |
| Kint::$enabled_mode = Kint::MODE_TEXT; | |
| $args = \func_get_args(); | |
| \call_user_func_array(array('\Kint', 'dump'), $args); | |
| die; | |
| } | |
| Kint::$aliases[] = 'ssd'; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment