function parse_doctype() { if (!parent::parse_doctype()) { return false; } //end($this->hierarchy)->addDoctype($this->status['dtd']); $index = null; //Needs to be passed by ref $this->hierarchy[count($this->hierarchy) - 1]->addDoctype($this->status['dtd'], $index); return true; }