|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24828 round() function doesn't round !
Submitted: 2003-07-27 06:34 UTC Modified: 2003-07-28 17:08 UTC
From: christophe dot bidaux at netcourrier dot com Assigned: edink (profile)
Status: Closed Package: Math related
PHP Version: 4CVS-2003-07-27 (stable) OS: Windows 98SE
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: christophe dot bidaux at netcourrier dot com
New email:
PHP Version: OS:


 [2003-07-27 06:34 UTC] christophe dot bidaux at netcourrier dot com
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

$foo = round( 3.5 );   // $foo == 4.0

$foo = round( 3.6 );   // $foo == 4.0

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)


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-07-28 17:08 UTC]
Fixed in the lates snapshot from
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Tue Oct 03 18:01:28 2023 UTC