ID:               29911
 Updated by:       [EMAIL PROTECTED]
 Reported By:      wb at pro-net dot co dot uk
-Status:           Open
+Status:           Bogus
 Bug Type:         DOM XML related
 Operating System: FreeBSD 5.2.1
 PHP Version:      5.0.1
 New Comment:

That's (with every object in PHP) expected behaviour.

Although

$dom->saveXML() == $dom2->saveXML()

should work


Previous Comments:
------------------------------------------------------------------------

[2004-08-31 12:59:55] wb at pro-net dot co dot uk

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


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=29911&edit=1

Reply via email to