original_string: public static function getFileExtension($filename)
      {
          $filename = basename($filename);
  
          // remove possible query string
          $pos = strpos($filename, '?');
          if ($pos !== false) {
              $filename = substr($filename, 0, $pos);
          }
  
          // retrieve the extension
          $pos = strrpos($filename, '.');
          if ($pos !== false) {
              return strtolower(substr($filename, $pos + 1));
          }
  
          return '';
      }
code: public static function getFileExtension($filename)
      {
          $filename = basename($filename);
  
          // remove possible query string
          $pos = strpos($filename, '?');
          if ($pos !== false) {
              $filename = substr($filename, 0, $pos);
          }
  
          // retrieve the extension
          $pos = strrpos($filename, '.');
          if ($pos !== false) {
              return strtolower(substr($filename, $pos + 1));
          }
  
          return '';
      }
code_tokens: public static function getFileExtension ( $ filename ) { $ filename = basename ( $ filename ) ; // remove possible query string $ pos = strpos ( $ filename , '?' ) ; if ( $ pos !== false ) { $ filename = substr ( $ filename , 0 , $ pos ) ; } // retrieve the extension $ pos = strrpos ( $ filename , '.' ) ; if ( $ pos !== false ) { return strtolower ( substr ( $ filename , $ pos + 1 ) ) ; } return '' ; }
docstring: Return the extension of a filename, or null if no extension could be found.
  The extension is lower-cased and does NOT contain a leading dot.
  When no extension can be found, we will return an empty string.
  
  @param string $filename
  @return string
docstring_tokens: Return the extension of a filename or null if no extension could be found . The extension is lower - cased and does NOT contain a leading dot . When no extension can be found we will return an empty string .