original_string: public static function get_file_extension($mimetype) {
          $types = self::get_types();
          foreach ($types as $extension => $info) {
              if ($info['type'] == $mimetype) {
                  return $extension;
              }
          }
          return false;
      }
code: public static function get_file_extension($mimetype) {
          $types = self::get_types();
          foreach ($types as $extension => $info) {
              if ($info['type'] == $mimetype) {
                  return $extension;
              }
          }
          return false;
      }
code_tokens: public static function get_file_extension ( $ mimetype ) { $ types = self :: get_types ( ) ; foreach ( $ types as $ extension => $ info ) { if ( $ info [ 'type' ] == $ mimetype ) { return $ extension ; } } return false ; }
docstring: Given a mimetype - return a valid file extension for it.
  
  @param $mimetype string
  @return string|bool False if the mimetype was not known, a string indicating a valid file extension otherwise. It may not
  be the only valid file extension - just the first one found.
docstring_tokens: Given a mimetype - return a valid file extension for it .