public static function exch($cx, $ch, $vars, &$options) {
        $args = $vars[0];
        $args[] = $options;
        $e = null;
        $r = true;

        try {
            $r = call_user_func_array($cx['helpers'][$ch], $args);
        } catch (\Exception $E) {
            $e = "Runtime: call custom helper '$ch' error: " . $E->getMessage();
        }

        if($e !== null) {
            static::err($cx, $e);
        }

        return $r;
    }
public static function exch($cx, $ch, $vars, &$options) {
        $args = $vars[0];
        $args[] = $options;
        $e = null;
        $r = true;

        try {
            $r = call_user_func_array($cx['helpers'][$ch], $args);
        } catch (\Exception $E) {
            $e = "Runtime: call custom helper '$ch' error: " . $E->getMessage();
        }

        if($e !== null) {
            static::err($cx, $e);
        }

        return $r;
    }
public static function exch ( $ cx , $ ch , $ vars , & $ options ) { $ args = $ vars [ 0 ] ; $ args [ ] = $ options ; $ e = null ; $ r = true ; try { $ r = call_user_func_array ( $ cx [ 'helpers' ] [ $ ch ] , $ args ) ; } catch ( \ Exception $ E ) { $ e = "Runtime: call custom helper '$ch' error: " . $ E -> getMessage ( ) ; } if ( $ e !== null ) { static :: err ( $ cx , $ e ) ; } return $ r ; }
Execute custom helper with prepared options

@param array<string,array|string|integer> $cx render time context for lightncandy
@param string $ch the name of custom helper to be executed
@param array<array|string|integer>|string|integer|null $vars variables for the helper
@param array<string,array|string|integer> $options the options object

@return string The rendered string of the token
Execute custom helper with prepared options