public static function debug($v, $f, $cx) {
        // Build array of reference for call_user_func_array
        $P = func_get_args();
        $params = array();
        for ($i=2;$i<count($P);$i++) {
            $params[] = &$P[$i];
        }
        $r = call_user_func_array((isset($cx['funcs'][$f]) ? $cx['funcs'][$f] : "{$cx['runtime']}::$f"), $params);

        if ($cx['flags']['debug'] & static::DEBUG_TAGS) {
            $ansi = $cx['flags']['debug'] & (static::DEBUG_TAGS_ANSI - static::DEBUG_TAGS);
            $html = $cx['flags']['debug'] & (static::DEBUG_TAGS_HTML - static::DEBUG_TAGS);
            $cs = ($html ? (($r !== '') ? '<!!--OK((-->' : '<!--MISSED((-->') : '')
                  . ($ansi ? (($r !== '') ? "\033[0;32m" : "\033[0;31m") : '');
            $ce = ($html ? '<!--))-->' : '')
                  . ($ansi ? "\033[0m" : '');
            switch ($f) {
                case 'sec':
                case 'wi':
                    if ($r == '') {
                        if ($ansi) {
                            $r = "\033[0;33mSKIPPED\033[0m";
                        }
                        if ($html) {
                            $r = '<!--SKIPPED-->';
                        }
                    }
                    return "$cs{{#{$v}}}$ce{$r}$cs{{/{$v}}}$ce";
                default:
                    return "$cs{{{$v}}}$ce";
            }
        } else {
            return $r;
        }
    }
public static function debug($v, $f, $cx) {
        // Build array of reference for call_user_func_array
        $P = func_get_args();
        $params = array();
        for ($i=2;$i<count($P);$i++) {
            $params[] = &$P[$i];
        }
        $r = call_user_func_array((isset($cx['funcs'][$f]) ? $cx['funcs'][$f] : "{$cx['runtime']}::$f"), $params);

        if ($cx['flags']['debug'] & static::DEBUG_TAGS) {
            $ansi = $cx['flags']['debug'] & (static::DEBUG_TAGS_ANSI - static::DEBUG_TAGS);
            $html = $cx['flags']['debug'] & (static::DEBUG_TAGS_HTML - static::DEBUG_TAGS);
            $cs = ($html ? (($r !== '') ? '<!!--OK((-->' : '<!--MISSED((-->') : '')
                  . ($ansi ? (($r !== '') ? "\033[0;32m" : "\033[0;31m") : '');
            $ce = ($html ? '<!--))-->' : '')
                  . ($ansi ? "\033[0m" : '');
            switch ($f) {
                case 'sec':
                case 'wi':
                    if ($r == '') {
                        if ($ansi) {
                            $r = "\033[0;33mSKIPPED\033[0m";
                        }
                        if ($html) {
                            $r = '<!--SKIPPED-->';
                        }
                    }
                    return "$cs{{#{$v}}}$ce{$r}$cs{{/{$v}}}$ce";
                default:
                    return "$cs{{{$v}}}$ce";
            }
        } else {
            return $r;
        }
    }
public static function debug ( $ v , $ f , $ cx ) { // Build array of reference for call_user_func_array $ P = func_get_args ( ) ; $ params = array ( ) ; for ( $ i = 2 ; $ i < count ( $ P ) ; $ i ++ ) { $ params [ ] = & $ P [ $ i ] ; } $ r = call_user_func_array ( ( isset ( $ cx [ 'funcs' ] [ $ f ] ) ? $ cx [ 'funcs' ] [ $ f ] : "{$cx['runtime']}::$f" ) , $ params ) ; if ( $ cx [ 'flags' ] [ 'debug' ] & static :: DEBUG_TAGS ) { $ ansi = $ cx [ 'flags' ] [ 'debug' ] & ( static :: DEBUG_TAGS_ANSI - static :: DEBUG_TAGS ) ; $ html = $ cx [ 'flags' ] [ 'debug' ] & ( static :: DEBUG_TAGS_HTML - static :: DEBUG_TAGS ) ; $ cs = ( $ html ? ( ( $ r !== '' ) ? '<!!--OK((-->' : '<!--MISSED((-->' ) : '' ) . ( $ ansi ? ( ( $ r !== '' ) ? "\033[0;32m" : "\033[0;31m" ) : '' ) ; $ ce = ( $ html ? '<!--))-->' : '' ) . ( $ ansi ? "\033[0m" : '' ) ; switch ( $ f ) { case 'sec' : case 'wi' : if ( $ r == '' ) { if ( $ ansi ) { $ r = "\033[0;33mSKIPPED\033[0m" ; } if ( $ html ) { $ r = '<!--SKIPPED-->' ; } } return "$cs{{#{$v}}}$ce{$r}$cs{{/{$v}}}$ce" ; default : return "$cs{{{$v}}}$ce" ; } } else { return $ r ; } }
Output debug info.

@param string $v expression
@param string $f runtime function name
@param array<string,array|string|integer> $cx render time context for lightncandy

@expect '{{123}}' when input '123', 'miss', array('flags' => array('debug' => Runtime::DEBUG_TAGS), 'runtime' => 'LightnCandy\\Runtime'), ''
@expect '<!--MISSED((-->{{#123}}<!--))--><!--SKIPPED--><!--MISSED((-->{{/123}}<!--))-->' when input '123', 'wi', array('flags' => array('debug' => Runtime::DEBUG_TAGS_HTML), 'runtime' => 'LightnCandy\\Runtime'), false, null, false, function () {return 'A';}
Output debug info .