/**
  * @param type $expr
  * @return type
  */
 protected function evaluateFuncCall($expr)
 {
     if (isset($expr->name->parts)) {
         if (count($expr->name->parts) != 1) {
             return $this->error("Unsupported FuncCall expression", $expr);
         }
         $functionName = $expr->name->parts[0];
         $map = ['help' => [$this, 'fnHelp']];
         $isFunctionAllowed = in_array($functionName, $this->allowedFunctions) || in_array($functionName, array_keys($map));
         if (is_callable(array($this->callbackManager, $functionName))) {
             $functionName = array($this->callbackManager, $functionName);
         } else {
             if (!$isFunctionAllowed && function_exists($functionName)) {
                 return $this->error("Unauthorized function '{$functionName}'", $expr);
             } elseif (!$isFunctionAllowed) {
                 return $this->error("Unknown function '{$functionName}'", $expr);
             }
             if (isset($map[$functionName])) {
                 $functionName = $map[$functionName];
             }
         }
         $args = $this->evaluateArgs($expr);
         $result = call_user_func_array($functionName, $args);
         return $this->debug($expr, $result);
     } elseif ($expr->name instanceof \PhpParser\Node\Expr\Variable) {
         $variable = $this->registry->get($expr->name->name);
         if (!isset($variable)) {
             return $this->error("Unsupported FuncCall expression - Unkown function", $expr);
         }
         if (!is_callable($variable)) {
             return $this->error("Unsupported FuncCall expression - Variable is not a function", $expr);
         }
         $result = call_user_func_array($variable, $args = []);
         return $this->debug($expr, $result);
     } else {
         return $this->error("Unsupported FuncCall expression", $expr);
     }
 }