#28228 [Fbk]: number_format function bug
| From: | amt@php.net | Date: | Fri, 30 Apr 2004 01:04:40 +0000 |
| Subject: | #28228 [Fbk]: number_format function bug | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-59045@lists.php.net to get a copy of this message | ||
ID: 28228
Updated by: amt@php.net
Reported By: bichinhoverde at spwinternet dot com dot br
Status: Feedback
Bug Type: Unknown/Other Function
Operating System: windows and linux
PHP Version: 4.3.6
New Comment:
Oops. Disregard that last comment. What I meant to write
was:
This is a bug, not a feature. Why would you want to
print a number without a decimal point? It wouldn't be
the same number. A number without a thousands separator,
however, is still understandable.
Previous Comments:
------------------------------------------------------------------------
[2004-04-30 03:02:53] amt@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php4-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip
------------------------------------------------------------------------
[2004-04-30 02:49:02] bichinhoverde at spwinternet dot com dot br
Description:
------------
When I put an empty string '' as the decimal point in the number_format
function, it uses the dot '.' as decimal point.
The function works well for the thousands separator.
Reproduce code:
---------------
print number_format(1234.5678, 2, '', '');
Expected result:
----------------
123457
Actual result:
--------------
1234.57
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=28228&edit=1