code: public static function IMSUM(...$complexNumbers)
      {
          // Return value
          $returnValue = self::parseComplex('0');
          $activeSuffix = '';
  
          // Loop through the arguments
          $aArgs = Functions::flattenArray($complexNumbers);
          foreach ($aArgs as $arg) {
              $parsedComplex = self::parseComplex($arg);
  
              if ($activeSuffix == '') {
                  $activeSuffix = $parsedComplex['suffix'];
              } elseif (($parsedComplex['suffix'] != '') && ($activeSuffix != $parsedComplex['suffix'])) {
                  return Functions::NAN();
              }
  
              $returnValue['real'] += $parsedComplex['real'];
              $returnValue['imaginary'] += $parsedComplex['imaginary'];
          }
  
          if ($returnValue['imaginary'] == 0.0) {
              $activeSuffix = '';
          }
  
          return self::COMPLEX($returnValue['real'], $returnValue['imaginary'], $activeSuffix);
      }
docs: IMSUM.
  
  Returns the sum of two or more complex numbers in x + yi or x + yj text format.
  
  Excel Function:
  IMSUM(complexNumber[,complexNumber[,...]])
  
  @param string ...$complexNumbers Series of complex numbers to add
  
  @return string