public function __destroy() { if ($this->parser) { xml_parse($this->parser, '', true); xml_parser_free($this->parser); } }