php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #62454 change in handling zero length strings.
Submitted: 2012-06-30 08:43 UTC Modified: 2012-07-20 09:09 UTC
From: m at micheas dot net Assigned:
Status: Wont fix Package: Documentation problem
PHP Version: 5.3.14 OS:
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: m at micheas dot net
New email:
PHP Version: OS:

 

 [2012-06-30 08:43 UTC] m at micheas dot net
Description:
------------
---
From manual page: http://www.php.net/function.number-format#refsect1-
function.number-format-changelog
---
In prior to php 5.3 non-numeric input returned 0 it now returns null.

Test script:
---------------
/* this returns 0 prior to php 5.3. As of 5.3 it returns Null */
print number_format("",0);



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-06-30 11:10 UTC] nikic@php.net
Related: https://bugs.php.net/bug.php?id=50696

As of PHP 5.3 all functions (minus a few rare exceptions) throw a warning (and return NULL) on invalid parameters. As this is the same for all functions it isn't explicitly documented.

As the number_format case now came up again one could maybe add a note in the changelog or something like that.
 [2012-07-20 09:09 UTC] aharvey@php.net
General policy is not to fix these. (And yes, given the commit I just made for doc bug #62471, I realise I'm a giant hypocrite saying that.)
 [2012-07-20 09:09 UTC] aharvey@php.net
-Status: Open +Status: Wont fix
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Dec 27 04:01:29 2024 UTC