Req #53457 [NEW]: number_format must support more than one character for thousands separator
From:
Operating system: Any
PHP version: Irrelevant
Package: Strings related
Bug Type: Feature/Change Request
Bug description:number_format must support more than one character for thousands separator
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 bug report at http://bugs.php.net/bug.php?id=53457&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=53457&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=53457&r=trysnapshot53
Try a snapshot (trunk): http://bugs.php.net/fix.php?id=53457&r=trysnapshottrunk
Fixed in SVN: http://bugs.php.net/fix.php?id=53457&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=53457&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=53457&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=53457&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=53457&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=53457&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=53457&r=support
Expected behavior: http://bugs.php.net/fix.php?id=53457&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=53457&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=53457&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=53457&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=53457&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=53457&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=53457&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=53457&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=53457&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=53457&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=53457&r=mysqlcfg
Thread (3 messages)
- mbabuskov at yahoo dot com