Registering the shutdown function
Shutdown function: register_shutdown_function()
Suppose you have the exit()
function called in multiple points.
If you want to detect the shutdown triggered by exit()
call, you can βregisterβ your function that you want to call once exit()
is executed.