php.net |  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
Description:
------------
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:
---------------
<?php
echo number_format(123456789,0, '.', '--');
?>

Expected result:
----------------
123-456-789

Actual result:
--------------
123,456,789

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-07-29 15:00 UTC] sniper@php.net
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
http://snaps.php.net/.
 
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 Dec 30 14:01:28 2024 UTC