code: public function resolveFunction(
          IContainer $container,
          $functionName,
          array $args = []
      ) {
          $function = new ReflectionFunction($functionName);
  
          try {
              $arguments = $this->buildArgumentsFromParameters(
                  $container, $function->getParameters(), $args
              );
          } catch (UnresolveableArgumentException $ex) {
              $ex->setFunctionName($function->isClosure() ? 'Closure' : $function->getName());
  
              throw $ex;
          }
  
          return $function->invokeArgs($arguments);
      }
docs: @param IContainer $container
  @param $functionName
  @param array $args
  
  @return mixed
  @throws Exception
  @throws UnresolveableArgumentException