PHP function called on server shutdown?
Is there anyway to register a PHP callback function to be executed when t开发者_运维技巧he HTTP server is shutdown?
No, because PHP would already have been shutdown since it is the server that loads it as a module.
No. It is not possible
There might exists some hooks that can be called on BeforeShutdown() but they depend on the HTTP server flavour and the callbacks may or not be appliable to PHP. This could be a question for serverFault.
精彩评论