Registers a function to call when the processor shuts down.
| Parameters: | callable|object – Function or process object |
|---|---|
| Return type: | object XPSPLProcess |
<?php
xp_on_shutdown(function(){
echo 'Shutting down the processor!';
});
xp_wait_loop();
The above code will output.
Shutting down the processor!