code: function parse_doctype() {
  		$start = $this->pos;
  		if ($this->next_search('[>', false) === self::TOK_UNKNOWN)  {
  			if ($this->doc[$this->pos] === '[') {
  				if (($this->next_pos(']', false) !== self::TOK_UNKNOWN) || ($this->next_pos('>', false) !== self::TOK_UNKNOWN)) {
  					$this->addError('Invalid doctype');
  					return false;
  				}
  			}
  
  			$this->token_start = $start;
  			$this->status['dtd'] = $this->getTokenString(2, -1);
  			$this->status['last_pos'] = $this->pos;
  			return true;
  		} else {
  			$this->addError('Invalid doctype');
  			return false;
  		}
  	}
docs: Parse doctype tag
  @internal Gets called with doctype ("<!doctype")
  @internal Stores text in {@link $status}[dtd]
  @return bool