Communities for your favorite technologies. Explore all Collectives
Stack Overflow for Teams is now called Stack Internal. Bring the best of human thought and AI automation together at your work.
Bring the best of human thought and AI automation together at your work. Learn more
Find centralized, trusted content and collaborate around the technologies you use most.
Stack Internal
Knowledge at work
Bring the best of human thought and AI automation together at your work.
Is there anyway to register a PHP callback function to be executed when the HTTP server is shutdown?
No, because PHP would already have been shutdown since it is the server that loads it as a module.
Add a comment
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.
Start asking to get answers
Find the answer to your question by asking.
Explore related questions
See similar questions with these tags.