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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: shagren at ua dot fm
New email:
PHP Version: OS:

 

 [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-2025 The PHP Group
All rights reserved.
Last updated: Thu Jan 02 12:01:29 2025 UTC