Created
July 26, 2017 01:53
-
-
Save EionRobb/10906f82ede74970752b8d321a5a8bb7 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 | |
| function max_execution_time_handler() { | |
| set_time_limit(0); | |
| $err = error_get_last(); | |
| if ($err != null && preg_match('@^Maximum execution time@', $err['message'])) { | |
| ob_start(); | |
| debug_print_backtrace(); | |
| $backtrace = ob_get_clean(); | |
| error_log($backtrace); | |
| } | |
| } | |
| register_shutdown_function('max_execution_time_handler'); | |
| ini_set('max_execution_time', 1); | |
| sleep(3); | |
| echo 'here'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment