#39641 [NEW]: Expression evaluation violates intuition

From: Date: Mon, 27 Nov 2006 05:10:48 +0000
Subject: #39641 [NEW]: Expression evaluation violates intuition
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-105456@lists.php.net to get a copy of this message
From: netex at 163 dot com Operating system: FreeBSD 6.1 PHP version: 5.2.0 PHP Bug Type: Variables related Bug description: Expression evaluation violates intuition 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 bug report at http://bugs.php.net/?id=39641&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=39641&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=39641&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=39641&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=39641&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=39641&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=39641&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=39641&r=needscript Try newer version: http://bugs.php.net/fix.php?id=39641&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=39641&r=support Expected behavior: http://bugs.php.net/fix.php?id=39641&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=39641&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=39641&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=39641&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=39641&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=39641&r=dst IIS Stability: http://bugs.php.net/fix.php?id=39641&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=39641&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=39641&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=39641&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=39641&r=mysqlcfg

« previous php.bugs (#105456) next »