|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #53457 number_format must support more than one character for thousands separator
Submitted: 2010-12-02 23:16 UTC Modified: 2010-12-03 11:10 UTC
From: mbabuskov at yahoo dot com Assigned: aharvey (profile)
Status: Closed Package: Strings related
PHP Version: Irrelevant OS: Any
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
19 + 37 = ?
Subscribe to this entry?

 [2010-12-02 23:16 UTC] mbabuskov at yahoo dot com
From the documentation for number_format function:

    Sets the thousands separator.
    Only the first byte of thousands_sep is used. 

This makes it useless for any real world usage. The recommended HTML character for thousands separator is half-space, or   which is 8 characters. Function is only usable for obsolete or archaic systems

Test script:
echo number_format(123456, 2, '.', ' ');

Expected result:
123 456.00

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-12-03 10:37 UTC]
-Status: Open +Status: Assigned -Assigned To: +Assigned To: aharvey
 [2010-12-03 11:10 UTC]
Automatic comment from SVN on behalf of aharvey
Log: Implement FR #53457 (number_format must support more than one character for
thousands separator).
 [2010-12-03 11:10 UTC]
-Status: Assigned +Status: Closed
 [2010-12-03 11:10 UTC]
This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.

Implemented on trunk.
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Thu May 28 00:01:26 2020 UTC