code: private function rankAcceptCharsetHeaders(array $charsetHeaders): array
      {
          usort($charsetHeaders, [$this, 'compareAcceptCharsetHeaders']);
          $rankedCharsetHeaders = array_filter($charsetHeaders, [$this, 'filterZeroScores']);
  
          // Have to return the values because the keys aren't updated in array_filter()
          return array_values($rankedCharsetHeaders);
      }
docs: Ranks the charset headers by quality, and then by specificity
  
  @param AcceptCharsetHeaderValue[] $charsetHeaders The list of charset headers to rank
  @return AcceptCharsetHeaderValue[] The ranked list of charset headers