|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #33917 number_format incorrect work when use "long" th. separator
Submitted: 2005-07-29 14:33 UTC Modified: 2005-07-29 15:00 UTC
From: shagren at ua dot fm Assigned:
Status: Closed Package: Strings related
PHP Version: 5.1.0b3 OS: Win2k/Linux
Private report: No CVE-ID: None
 [2005-07-29 14:33 UTC] shagren at ua dot fm
In documentation i can read :  Only the first character of thousands_sep  is used. For example, if you use foo as thousands_sep on the number 1000, number_format() will return 1f000.

But in my example when i use "Long" parameter it ignored and some default value used.

I test it on versions 4.3.6, 5.1.0b3

Reproduce code:
echo number_format(123456789,0, '.', '--');

Expected result:

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-07-29 15:00 UTC]
This bug has been fixed in CVS.

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.

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon May 27 16:02:36 2024 UTC