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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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

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: Thu Apr 18 07:01:27 2024 UTC