Req #53457 [Opn->Asn]: number_format must support more than one character for thousands separator
| From: | aharvey@php.net | Date: | Fri, 03 Dec 2010 09:37:36 +0000 |
| Subject: | Req #53457 [Opn->Asn]: number_format must support more than one character for thousands separator | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-156717@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=53457&edit=1
ID: 53457
Updated by: aharvey@php.net
Reported by: mbabuskov at yahoo dot com
Summary: number_format must support more than one character
for thousands separator
-Status: Open
+Status: Assigned
Type: Feature/Change Request
Package: Strings related
Operating System: Any
PHP Version: Irrelevant
-Assigned To:
+Assigned To: aharvey
Block user comment: N
Private report: N
Previous Comments:
------------------------------------------------------------------------
[2010-12-02 23:16:28] mbabuskov at yahoo dot com
Description:
------------
From the documentation for number_format function:
thousands_sep
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
http://en.wikipedia.org/wiki/Thin_space
http://en.wikipedia.org/wiki/Thousands_separator#Digit_grouping
Test script:
---------------
echo number_format(123456, 2, '.', ' ');
Expected result:
----------------
123 456.00
Actual result:
--------------
123&456.00
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=53457&edit=1