From: judas dot iscariote at gmail dot com Operating system: Irrelevant PHP version: 5CVS-2007-06-15 (CVS) PHP Bug Type: SimpleXML related Bug description: Impossible to compare simpleXML Objects
Description: ------------ You cannot compare simpleXML Objects. Reproduce code: --------------- <?php $xmlstring = '<?xml version="1.0" standalone="yes"?><foo></foo>'; $foo = new SimpleXMLElement($xmlstring); $bar = new SimpleXMLElement($xmlstring); /* "Two object instances are equal if they have the same attributes and values, and are instances of the same class" */ var_dump($foo == $bar); /* object are identical if and only if they refer to the same instance of the same class.*/ var_dump($foo === $bar); ?> Expected result: ---------------- //the are equal bool(true) //but not indentical bool(false) Actual result: -------------- bool(false) bool(false) -- Edit bug report at http://bugs.php.net/?id=41697&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=41697&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=41697&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=41697&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=41697&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=41697&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=41697&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=41697&r=needscript Try newer version: http://bugs.php.net/fix.php?id=41697&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=41697&r=support Expected behavior: http://bugs.php.net/fix.php?id=41697&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=41697&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=41697&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=41697&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=41697&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=41697&r=dst IIS Stability: http://bugs.php.net/fix.php?id=41697&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=41697&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=41697&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=41697&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=41697&r=mysqlcfg