php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #3439 Round not rounding .5s properly
Submitted: 2000-02-09 17:40 UTC Modified: 2000-02-09 17:54 UTC
From: ijones at mbcomp dot co dot uk Assigned:
Status: Closed Package: Misbehaving function
PHP Version: 3.0.14 OS: Redhat 6.0
Private report: No CVE-ID: None
 [2000-02-09 17:40 UTC] ijones at mbcomp dot co dot uk
the round command rounds down fractions that are .5 instead of rounding them up....eg

echo round(2.6);
3

echo round(2.5);
2


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-02-09 17:54 UTC] rasmus at cvs dot php dot net
Please read the user notes at: http://www.php.net/manual/function.round.php3
There is no bug here.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Sun Oct 11 14:00:01 2026 UTC