php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #459 number_format misbehaving?
Submitted: 1998-06-15 06:13 UTC Modified: 1998-06-15 14:27 UTC
From: graeme at kc dot co dot nz Assigned:
Status: Closed Package: Misbehaving function
PHP Version: 3.0 Final Release OS: Linux-2.0.20 + Win95(RC4)
Private report: No CVE-ID: None
 [1998-06-15 06:13 UTC] graeme at kc dot co dot nz
number_format allows 2 optional separators (decimal and thousands) 
but does not allow you to have only the deciaml operator.
This works
echo number_format(12.345,2)
and this works
echo number_format(12.345,2,".",",")
but not
echo number_format(12.345,2,".");

An error occurs saying "Wrong parameter count".
The thousands separator should be optional regardless of the decimal separator.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1998-06-15 14:27 UTC] zeev
Why?  It makes no sense to only override one of the separators.  This was intentional.

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 07:01:29 2024 UTC