code: public static function SMALL(...$args)
      {
          $aArgs = Functions::flattenArray($args);
  
          // Calculate
          $entry = array_pop($aArgs);
  
          if ((is_numeric($entry)) && (!is_string($entry))) {
              $mArgs = [];
              foreach ($aArgs as $arg) {
                  // Is it a numeric value?
                  if ((is_numeric($arg)) && (!is_string($arg))) {
                      $mArgs[] = $arg;
                  }
              }
              $count = self::COUNT($mArgs);
              $entry = floor(--$entry);
              if (($entry < 0) || ($entry >= $count) || ($count == 0)) {
                  return Functions::NAN();
              }
              sort($mArgs);
  
              return $mArgs[$entry];
          }
  
          return Functions::VALUE();
      }
docs: SMALL.
  
  Returns the nth smallest value in a data set. You can use this function to
  select a value based on its relative standing.
  
  Excel Function:
  SMALL(value1[,value2[, ...]],entry)
  
  @category Statistical Functions
  
  @param mixed $args Data values
  @param int $entry Position (ordered from the smallest) in the array or range of data to return
  
  @return float