public static Memory checkReturnType(Environment env, TraceInfo trace, Memory result, final FunctionEntity function) {
        return checkReturnType(
                env, trace, result,
                new Function<String>() {
                    @Override
                    public String call() {
                        return function.getName();
                    }
                },
                function.getReturnTypeChecker(), function.isReturnTypeNullable()
        );
    }
Method is invoked via bytecode

@throws Throwable
jphp-runtime/src/php/runtime/invoke/InvokeHelper.java