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