#33917 [NEW]: number_format incorrect work when use "long" th. separator
| From: | shagren at ua dot fm | Date: | Fri, 29 Jul 2005 12:33:25 +0000 |
| Subject: | #33917 [NEW]: number_format incorrect work when use "long" th. separator | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-82656@lists.php.net to get a copy of this message | ||
From: shagren at ua dot fm
Operating system: Win2k/Linux
PHP version: 5.1.0b3
PHP Bug Type: Strings related
Bug description: number_format incorrect work when use "long" th. separator
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
--
Edit bug report at http://bugs.php.net/?id=33917&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=33917&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=33917&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=33917&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=33917&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=33917&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=33917&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=33917&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=33917&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=33917&r=support
Expected behavior: http://bugs.php.net/fix.php?id=33917&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=33917&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=33917&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=33917&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=33917&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=33917&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=33917&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=33917&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=33917&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=33917&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=33917&r=mysqlcfg