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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: graeme at kc dot co dot nz
New email:
PHP Version: OS:

 

 [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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Fri May 09 21:01:27 2025 UTC