code: public static function QUARTILE(...$args)
      {
          $aArgs = Functions::flattenArray($args);
  
          // Calculate
          $entry = floor(array_pop($aArgs));
  
          if ((is_numeric($entry)) && (!is_string($entry))) {
              $entry /= 4;
              if (($entry < 0) || ($entry > 1)) {
                  return Functions::NAN();
              }
  
              return self::PERCENTILE($aArgs, $entry);
          }
  
          return Functions::VALUE();
      }
docs: QUARTILE.
  
  Returns the quartile of a data set.
  
  Excel Function:
  QUARTILE(value1[,value2[, ...]],entry)
  
  @category Statistical Functions
  
  @param mixed $args Data values
  @param int $entry Quartile value in the range 1..3, inclusive.
  
  @return float