2 questions for PHP in Linux:
1.) will register_shutdown_function be called if a script exceeds the maximum time limit for the script to run?
2.) if #1 is true, how can I test a script going beyond its max time limit if sleep() doesn’t count towards execution time?
A function registered with
register_shutdown_functionwill be called when the execution time limit is reached. You can test the limit with a busy wait: