#30903 [NEW]: (int) doesn't work as expected

From: Date: Fri, 26 Nov 2004 09:28:47 +0000
Subject: #30903 [NEW]: (int) doesn't work as expected
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-69468@lists.php.net to get a copy of this message
From: ndesmet at matedex dot be Operating system: windows 2000 PHP version: 5.0.2 PHP Bug Type: Scripting Engine problem Bug description: (int) doesn't work as expected Description: ------------ Problem with truncate function. Reproduce code: --------------- print ( ((4.06*75)+0.5) ); print("<BR>"); print ( (int) ((4.06*75)+0.5) ); Expected result: ---------------- 305 305 Actual result: -------------- 305 304 -- Edit bug report at http://bugs.php.net/?id=30903&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=30903&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30903&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30903&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=30903&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=30903&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=30903&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=30903&r=needscript Try newer version: http://bugs.php.net/fix.php?id=30903&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=30903&r=support Expected behavior: http://bugs.php.net/fix.php?id=30903&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=30903&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=30903&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=30903&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=30903&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=30903&r=dst IIS Stability: http://bugs.php.net/fix.php?id=30903&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=30903&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=30903&r=float MySQL Configuration Error: http://bugs.php.net/fix.php?id=30903&r=mysqlcfg

« previous php.bugs (#69468) next »