original_string: public static function getGeoIPUrlExtension($url)
      {
          // check for &suffix= query param that is special to MaxMind URLs
          if (preg_match('/suffix=([^&]+)/', $url, $matches)) {
              $ext = $matches[1];
          } else {
              // use basename of url
              $filenameParts = explode('.', basename($url), 2);
              if (count($filenameParts) > 1) {
                  $ext = end($filenameParts);
              } else {
                  $ext = reset($filenameParts);
              }
          }
  
          self::checkForSupportedArchiveType($ext);
  
          return $ext;
      }
code: public static function getGeoIPUrlExtension($url)
      {
          // check for &suffix= query param that is special to MaxMind URLs
          if (preg_match('/suffix=([^&]+)/', $url, $matches)) {
              $ext = $matches[1];
          } else {
              // use basename of url
              $filenameParts = explode('.', basename($url), 2);
              if (count($filenameParts) > 1) {
                  $ext = end($filenameParts);
              } else {
                  $ext = reset($filenameParts);
              }
          }
  
          self::checkForSupportedArchiveType($ext);
  
          return $ext;
      }
code_tokens: public static function getGeoIPUrlExtension ( $ url ) { // check for &suffix= query param that is special to MaxMind URLs if ( preg_match ( '/suffix=([^&]+)/' , $ url , $ matches ) ) { $ ext = $ matches [ 1 ] ; } else { // use basename of url $ filenameParts = explode ( '.' , basename ( $ url ) , 2 ) ; if ( count ( $ filenameParts ) > 1 ) { $ ext = end ( $ filenameParts ) ; } else { $ ext = reset ( $ filenameParts ) ; } } self :: checkForSupportedArchiveType ( $ ext ) ; return $ ext ; }
docstring: Returns the extension of a URL used to update a GeoIP 2 database, if it can be found.
docstring_tokens: Returns the extension of a URL used to update a GeoIP 2 database if it can be found .