// VERY BEGIN OF SCRIPT
$_SERVER[\'HX_startTime\'] = microtime(true);
...
// MY SHUTDOWN FUNCTION
register_shutdown_function(\'HX_shutdownFn\');
function HX_shutdo
A shutdown function will run out of the normal stack after some connection would be closed and cleanup is done. A delay will always occur as its kind of nature of this function, depending what you have done before or try to do in this function.
The manual does not tell but it is a DEBUGGING function and should also be treated so.
On normal operation you should never use it. There is no advantage. You may call your shutdown function on end of the script manually and leave a handler for unexpected shutdowns.