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 |
This will create a SIG idenitified by ‘foo’.
<?php
xp_signal(XP_SIG('foo'), function(){
echo "HelloWorld";
});
xp_emit(XP_SIG('foo'));