|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-08-31 13:40 UTC] chregu@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 23 20:00:02 2025 UTC |
Description: ------------ Different DOMDocuments are always equal even if the 'XML' is different. Reproduce code: --------------- <?php $dom1 = new DOMDocument(); $dom1->loadXML("<root><node/></root>"); $dom2 = new DOMDocument(); $dom2->loadXML("<root><node/></root>"); $dom3 = new DOMDocument(); $dom3->loadXML("<root><node type=\"blah\"/></root>"); if($dom1 == $dom2){ print("dom1 == dom2\n"); }else{ print("dom1 != dom2\n"); } if($dom1 == $dom3){ print("dom1 == dom3\n"); }else{ print("dom1 != dom3\n"); } ?> Expected result: ---------------- dom1 == dom2 dom1 != dom3 Actual result: -------------- dom1 == dom2 dom1 == dom3