xp_on_start

xp_on_start($function)

Registers a function to call when the processor starts.

Parameters:callable|object – Function or process object
Return type:object XPSPLProcess

Example #1 Basic Usage

<?php

xp_on_start(function(){
    echo 'The processor started';
});

xp_wait_loop();

The above code will output.

The processor started!