Bug #66898 [Opn->Nab]: number_format requests extra parameters while not mandatory
| From: | requinix@php.net | Date: | Thu, 13 Mar 2014 17:26:47 +0000 |
| Subject: | Bug #66898 [Opn->Nab]: number_format requests extra parameters while not mandatory | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-184777@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=66898&edit=1
ID: 66898
Updated by: requinix@php.net
Reported by: wildewouter at gmail dot com
Summary: number_format requests extra parameters while not
mandatory
-Status: Open
+Status: Not a bug
Type: Bug
Package: Strings related
Operating System: Ubuntu 13.10
PHP Version: 5.6.0alpha3
Block user comment: N
Private report: N
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
The very first thing said in the documentation is
> This function accepts either one, two, or four parameters (not three):
Previous Comments:
------------------------------------------------------------------------
[2014-03-13 11:43:57] wildewouter at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/function.number-format
---
The final three parameters for the number_format function have a default but when only three of the
parameters are filled in, the fourth has become mandatory and it returns null (no fatal error)
Test script:
---------------
<?php
var_dump(number_format((float) 1.6, 1, '.'));
Expected result:
----------------
This should output the string 1.6
Actual result:
--------------
This outputs NULL
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=66898&edit=1