ID:               39641
 Updated by:       [EMAIL PROTECTED]
 Reported By:      netex at 163 dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         Variables related
 Operating System: FreeBSD 6.1
 PHP Version:      5.2.0
 New Comment:

Compare these values:
var_dump($a+$b);
var_dump(0xbde54b2b + 0xbca96520);


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

[2007-02-08 16:39:52] netex at 163 dot com

Still happens in 5.2.1

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

[2006-12-05 01:00:01] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".

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

[2006-11-27 09:54:22] [EMAIL PROTECTED]

That's exactly what I get on Linux and FreeBSD 5.5-RELEASE.

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

[2006-11-27 05:10:48] netex at 163 dot com

Description:
------------
Expression evaluation violates intuition, see the code:

Reproduce code:
---------------
<?
$a = -1109046485 & 0xffffffff;
$b = -1129749216 & 0xffffffff;
printf("%x + %x = %x\n",$a,$b,$a+$b);
printf("%x\n", 0xbde54b2b + 0xbca96520);
?>


Expected result:
----------------
X-Powered-By: PHP/5.2.0
Content-type: text/html

bde54b2b + bca96520 = 7a8eb04b
7a8eb04b


Actual result:
--------------
X-Powered-By: PHP/5.2.0
Content-type: text/html

bde54b2b + bca96520 = 80000000
7a8eb04b



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


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

Reply via email to