public static function proxy($cb, $name = null)
    {
        static $i = 0;
        $n = ++$i;
        Daemon::log('Debug::proxy #' . $n . ': SPAWNED (' . json_encode($name) . ')');
        return function (...$args) use ($cb, $name, $n) {
            Daemon::log('Debug::proxy #' . $n . ': CALLED (' . json_encode($name) . ')');
            $cb(...$args);
        };
    }
public static function proxy($cb, $name = null)
    {
        static $i = 0;
        $n = ++$i;
        Daemon::log('Debug::proxy #' . $n . ': SPAWNED (' . json_encode($name) . ')');
        return function (...$args) use ($cb, $name, $n) {
            Daemon::log('Debug::proxy #' . $n . ': CALLED (' . json_encode($name) . ')');
            $cb(...$args);
        };
    }
public static function proxy ( $ cb , $ name = null ) { static $ i = 0 ; $ n = ++ $ i ; Daemon :: log ( 'Debug::proxy #' . $ n . ': SPAWNED (' . json_encode ( $ name ) . ')' ) ; return function ( ... $ args ) use ( $ cb , $ name , $ n ) { Daemon :: log ( 'Debug::proxy #' . $ n . ': CALLED (' . json_encode ( $ name ) . ')' ) ; $ cb ( ... $ args ) ; } ; }
Returns a proxy callback function with logging for debugging purposes
@param  callable $cb Callback
@param  mixed $name Data
@return callable
Returns a proxy callback function with logging for debugging purposes