public static function runtime($context) {
        $class = new \ReflectionClass($context['runtime']);
        $ret = '';
        $methods = static::getClassMethods($context, $class);

        $exports = array_keys($context['usedCount']['runtime']);

        while (true) {
            if (array_sum(array_map(function ($name) use (&$exports, $methods) {
                $n = 0;
                foreach ($methods[$name][1] as $child => $count) {
                    if (!in_array($child, $exports)) {
                       $exports[] = $child;
                       $n++;
                    }
                }
                return $n;
            }, $exports)) == 0) {
                break;
            }
        }

        foreach ($exports as $export) {
            $ret .= ($methods[$export][0] . "\n");
        }

        return $ret;
    }
public static function runtime($context) {
        $class = new \ReflectionClass($context['runtime']);
        $ret = '';
        $methods = static::getClassMethods($context, $class);

        $exports = array_keys($context['usedCount']['runtime']);

        while (true) {
            if (array_sum(array_map(function ($name) use (&$exports, $methods) {
                $n = 0;
                foreach ($methods[$name][1] as $child => $count) {
                    if (!in_array($child, $exports)) {
                       $exports[] = $child;
                       $n++;
                    }
                }
                return $n;
            }, $exports)) == 0) {
                break;
            }
        }

        foreach ($exports as $export) {
            $ret .= ($methods[$export][0] . "\n");
        }

        return $ret;
    }
public static function runtime ( $ context ) { $ class = new \ ReflectionClass ( $ context [ 'runtime' ] ) ; $ ret = '' ; $ methods = static :: getClassMethods ( $ context , $ class ) ; $ exports = array_keys ( $ context [ 'usedCount' ] [ 'runtime' ] ) ; while ( true ) { if ( array_sum ( array_map ( function ( $ name ) use ( & $ exports , $ methods ) { $ n = 0 ; foreach ( $ methods [ $ name ] [ 1 ] as $ child => $ count ) { if ( ! in_array ( $ child , $ exports ) ) { $ exports [ ] = $ child ; $ n ++ ; } } return $ n ; } , $ exports ) ) == 0 ) { break ; } } foreach ( $ exports as $ export ) { $ ret .= ( $ methods [ $ export ] [ 0 ] . "\n" ) ; } return $ ret ; }
Export required standalone Runtime methods

@param array<string,array|string|integer> $context current compile context

@return string
Export required standalone Runtime methods