From: christophe dot bidaux at netcourrier dot com Operating system: Windows 98SE PHP version: 4CVS-2003-07-27 (stable) PHP Bug Type: Math related Bug description: round() function doesn't round !
Description: ------------ the round() function doesn't give me the results described in the documentation example. Reproduce code: --------------- // from the documentation example $foo = round( 3.4 ); // $foo == 3.0 var_dump($foo); $foo = round( 3.5 ); // $foo == 4.0 var_dump($foo); $foo = round( 3.6 ); // $foo == 4.0 var_dump($foo); Expected result: ---------------- float(3) float(4) float(4) (PHP Version 4.3.3RC1 version) Actual result: -------------- float(3) float(3) float(3) (PHP Version 4.3.3RC2-dev (Jul 27 2003 10:11:04) version) -- Edit bug report at http://bugs.php.net/?id=24828&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=24828&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=24828&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=24828&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=24828&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=24828&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=24828&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=24828&r=support Expected behavior: http://bugs.php.net/fix.php?id=24828&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=24828&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=24828&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=24828&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24828&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=24828&r=dst IIS Stability: http://bugs.php.net/fix.php?id=24828&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=24828&r=gnused