|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #73895 Missing format variation
Submitted: 2017-01-09 10:33 UTC Modified: 2017-01-09 10:48 UTC
Avg. Score:3.8 ± 1.1
Reproduced:4 of 4 (100.0%)
Same Version:2 (50.0%)
Same OS:1 (25.0%)
From: h dot larget at gmail dot com Assigned:
Status: Not a bug Package: *Math Functions
PHP Version: 7.0.14 OS: Ubuntu 16.04 LTS
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: h dot larget at gmail dot com
New email:
PHP Version: OS:


 [2017-01-09 10:33 UTC] h dot larget at gmail dot com
From manual page:

It is not specified that depending on php locale, the dot is replaced by comma.

it should not have this kind of behavior or being specified in the documentation.

Test script:
<?php echo "<br/>".round(2.447,2);

Expected result:

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2017-01-09 10:48 UTC]
-Status: Open +Status: Not a bug -Package: Documentation problem +Package: *Math Functions
 [2017-01-09 10:48 UTC]
It is not mentioned because it has nothing to do with round(). The comma is introduced when the floating-point value is converted to string.

echo 2.447; // 2.447
echo (string)2.447; // 2,447 with an appropriate locale
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Jul 20 07:01:28 2024 UTC