protected function callGlobalFunction(string $name, ?array $arguments = null)
    {
        if (function_exists($name)) {
            return call_user_func_array($name, $arguments ?? []);
        }

        throw new \ErrorException(
            sprintf("Undefined global function (%s) called!", $name));
    }