Created
June 28, 2016 17:50
-
-
Save arturom/d7664686cc61c9f8359299cb5b44f76c to your computer and use it in GitHub Desktop.
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 | |
set_error_handler(function ($errno, $errstr, $errfile, $errline) { | |
static $calls = 0; | |
echo PHP_EOL, PHP_EOL, $errno, ' ', $errstr, ' ', $errfile, ' ', $errline, PHP_EOL; | |
$bt = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS); | |
print_r($bt); | |
// debug_print_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS); | |
if($calls ++ > 3) { | |
exit(1); | |
} | |
}, E_ALL); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment