public static Memory call(Environment env, TraceInfo trace, String sign, String originName,
                              Memory[] args, FunctionCallCache callCache, int cacheIndex) throws Throwable {
        FunctionEntity function = null;

        if (callCache != null)
            function = callCache.get(env, cacheIndex);

        if (function == null) {
            function = env.fetchFunction(originName, sign);
            if (function != null && callCache != null) {
                callCache.put(env, cacheIndex, function);
            }
        }

        if (function == null) {
            if (!sign.isEmpty() && sign.charAt(0) != Information.NAMESPACE_SEP_CHAR) { // for global style invoke
                int p = sign.lastIndexOf(Information.NAMESPACE_SEP_CHAR);
                if (p > -1)
                    function = env.fetchFunction(originName.substring(p + 1), sign.substring(p + 1));
            }

            if (function == null) {
                env.error(trace, Messages.ERR_CALL_TO_UNDEFINED_FUNCTION.fetch(originName));
                return Memory.NULL;
            }

            if (callCache != null) {
                callCache.put(env, cacheIndex, function);
            }
        }

        return call(env, trace, function, args);
    }
Method is invoked via bytecode

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