Doc #62454 [Com]: change in handling zero length strings.

From: Date: Sat, 30 Jun 2012 11:10:48 +0000
Subject: Doc #62454 [Com]: change in handling zero length strings.
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-8519@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=62454&edit=1 ID: 62454 Comment by: nikic@php.net Reported by: m at micheas dot net Summary: change in handling zero length strings. Status: Open Type: Documentation Problem Package: Documentation problem PHP Version: 5.3.14 Block user comment: N Private report: N New Comment: 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. Previous Comments: ------------------------------------------------------------------------ [2012-06-30 08:43:44] 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); ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=62454&edit=1

« previous php.doc.bugs (#8519) next »