How can I make sure that some code, that is executed in a php shutdown function, that was registered via "register_shutdown_function" is also executed, if the user leaves the page or closes the tab or the whole browser of that page, before the shutdown code is executed, but after the page is displayed?
I just want to make sure the user cannot interrupt the shutdown code, once the page is displayed.
I refer to this:
http://www.php.net/manual/function.register-shutdown-function.php#92959
And do you think the code of Filip Dalge in this comment on php.net is the correct way?
Is it necessary for all php versions (only interested in >= 5.0) ? How (if so) does this behavior change in the different versions?