xp_after

xp_after($signal, $process)

Execute a function after a signal has been emitted.

Parameters:
  • object – \XPSPL\SIG
  • callable|process – PHP Callable or \XPSPL\Process.
Return type:

object \XPSPL\Process

Example #1 Basic Usage

<?php

xp_signal(XP_SIG('foo'), function(){
    echo 'foo';
});

xp_after(XP_SIG('foo'), function(){
    echo 'after foo';
});

The above code will output.

// fooafter foo