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 [url]http://bugs.php.net/?id=24828&edit=1[/url]
--
Try a CVS snapshot (php4): [url]http://bugs.php.net/fix.php?id=24828&r=trysnapshot4[/url]
Try a CVS snapshot (php5): [url]http://bugs.php.net/fix.php?id=24828&r=trysnapshot5[/url]
Fixed in CVS: [url]http://bugs.php.net/fix.php?id=24828&r=fixedcvs[/url]
Fixed in release: [url]http://bugs.php.net/fix.php?id=24828&r=alreadyfixed[/url]
Need backtrace: [url]http://bugs.php.net/fix.php?id=24828&r=needtrace[/url]
Try newer version: [url]http://bugs.php.net/fix.php?id=24828&r=oldversion[/url]
Not developer issue: [url]http://bugs.php.net/fix.php?id=24828&r=support[/url]
Expected behavior: [url]http://bugs.php.net/fix.php?id=24828&r=notwrong[/url]
Not enough info: [url]http://bugs.php.net/fix.php?id=24828&r=notenoughinfo[/url]
Submitted twice: [url]http://bugs.php.net/fix.php?id=24828&r=submittedtwice[/url]
register_globals: [url]http://bugs.php.net/fix.php?id=24828&r=globals[/url]
PHP 3 support discontinued: [url]http://bugs.php.net/fix.php?id=24828&r=php3[/url]
Daylight Savings: [url]http://bugs.php.net/fix.php?id=24828&r=dst[/url]
IIS Stability: [url]http://bugs.php.net/fix.php?id=24828&r=isapi[/url]
Install GNU Sed: [url]http://bugs.php.net/fix.php?id=24828&r=gnused[/url]