XP_SIG

XP_SIG($signal)

Generates an XPSPL SIG object from the given $signal.

This function is only a shorthand for new XPSPL\SIG($signal).

Parameters:string| – Signal process is attached to.
Return type:object XPSPLSIG

Example #1 Basic Usage

This will create a SIG idenitified by ‘foo’.

<?php
xp_signal(XP_SIG('foo'), function(){
    echo "HelloWorld";
});

xp_emit(XP_SIG('foo'));