ID: 36600 Updated by: [EMAIL PROTECTED] Reported By: georg at howen dot de -Status: Open +Status: Bogus Bug Type: DOM XML related Operating System: Linux, Win XP PHP Version: 5.1.2 New Comment:
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php DOMDocument::loadXML will return DOMDocument only when called staticly Previous Comments: ------------------------------------------------------------------------ [2006-03-03 09:55:29] georg at howen dot de Description: ------------ If you extend DOMDocument and try to use DOMDocument::loadXML() on a new DOMDocument within the extended class, this function will return true instead of a new instance of DOMDocument. Reproduce code: --------------- <?php class xDOMDocument extends DOMDocument { public function newDom($xml) { $internal_doc1 = new DOMDocument; $internal_doc1->loadXML($xml); print_r($internal_doc1); $internal_doc2 = DOMDocument::loadXML($xml); print_r($internal_doc2); } } $xml = '<def>Test</def>'; $dom = new xDOMDocument(); $dom->newDom($xml); Expected result: ---------------- DOMDocument Object ( ) DOMDocument Object ( ) Actual result: -------------- DOMDocument Object ( ) 1 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=36600&edit=1