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:
 [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

Add a Patch

Pull Requests

Add a Pull Request

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-2014 The PHP Group
All rights reserved.
Last updated: Fri Apr 18 23:01:58 2014 UTC