#27413 [NEW]: SimpleXML text comparison

From: Date: Fri, 27 Feb 2004 05:11:04 +0000
Subject: #27413 [NEW]: SimpleXML text comparison
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-55635@lists.php.net to get a copy of this message
From:             rbro at hotmail dot com
Operating system: Linux
PHP version:      5CVS-2004-02-26 (dev)
PHP Bug Type:     XML related
Bug description:  SimpleXML text comparison

Description:
------------
Doing the following SimpleXML text comparison does not give the expected
results.

Reproduce code:
---------------
<?php
$sxe = simplexml_load_string('<root a="123" />');

echo $sxe['a']."\n";

if ($sxe['a'] == '123')
{
	echo 'They are equal.'."\n";
}
else
{
	echo 'They are not equal.'."\n";
}
?>

Expected result:
----------------
123
They are equal.

Actual result:
--------------
123
They are not equal.

-- 
Edit bug report at http://bugs.php.net/?id=27413&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=27413&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=27413&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=27413&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=27413&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=27413&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=27413&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=27413&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=27413&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=27413&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=27413&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=27413&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=27413&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27413&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=27413&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=27413&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=27413&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=27413&r=float


Thread (11 messages)

« previous php.bugs (#55635) next »