code: public static function VARFunc(...$args)
      {
          $returnValue = Functions::DIV0();
  
          $summerA = $summerB = 0;
  
          // Loop through arguments
          $aArgs = Functions::flattenArray($args);
          $aCount = 0;
          foreach ($aArgs as $arg) {
              if (is_bool($arg)) {
                  $arg = (int) $arg;
              }
              // Is it a numeric value?
              if ((is_numeric($arg)) && (!is_string($arg))) {
                  $summerA += ($arg * $arg);
                  $summerB += $arg;
                  ++$aCount;
              }
          }
  
          if ($aCount > 1) {
              $summerA *= $aCount;
              $summerB *= $summerB;
              $returnValue = ($summerA - $summerB) / ($aCount * ($aCount - 1));
          }
  
          return $returnValue;
      }
docs: VARFunc.
  
  Estimates variance based on a sample.
  
  Excel Function:
  VAR(value1[,value2[, ...]])
  
  @category Statistical Functions
  
  @param mixed ...$args Data values
  
  @return float