|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-04-30 15:58 UTC] chregu@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 02:00:01 2025 UTC |
Description: ------------ DOMNodeList seems to be returning wrong objects. Reproduce code: --------------- <?php class element extends DOMElement { } $doc = new DOMDocument; $e = new element("e"); $doc->appendChild($e); $e = new element("e"); $doc->appendChild($e); $e = new element("e"); $doc->appendChild($e); $nodeList = $doc->getElementsByTagName("e"); foreach($nodeList as $element) { var_dump(get_class($element)); } Expected result: ---------------- string(7) "element" string(7) "element" string(7) "element" Actual result: -------------- string(10) "DOMElement" string(10) "DOMElement" string(7) "element"