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
