Bug #66898 [NEW]: number_format requests extra parameters while not mandatory

From: Date: Thu, 13 Mar 2014 11:43:58 +0000
Subject: Bug #66898 [NEW]: number_format requests extra parameters while not mandatory
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-184769@lists.php.net to get a copy of this message
From: wildewouter at gmail dot com Operating system: Ubuntu 13.10 PHP version: 5.6.0alpha3 Package: Strings related Bug Type: Bug Bug description:number_format requests extra parameters while not mandatory 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 bug report at https://bugs.php.net/bug.php?id=66898&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=66898&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=66898&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=66898&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=66898&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=66898&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=66898&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=66898&r=needscript Try newer version: https://bugs.php.net/fix.php?id=66898&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=66898&r=support Expected behavior: https://bugs.php.net/fix.php?id=66898&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=66898&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=66898&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=66898&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=66898&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=66898&r=dst IIS Stability: https://bugs.php.net/fix.php?id=66898&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=66898&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=66898&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=66898&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=66898&r=mysqlcfg

« previous php.bugs (#184769) next »