Bug #60977 [NEW]: number_format behavior changed when passing \0 for 4th parameter.
From: chobieeee
Operating system: OSX
PHP version: 5.4.0RC7
Package: Math related
Bug Type: Bug
Bug description:number_format behavior changed when passing \0 for 4th parameter.
Description:
------------
when I run the test code on php5.3. php returns 1328370011.72399998.
but in php5.4 that returns 1.
i don't know which behavior is correct. i think it should be returns same
result.
Test script:
---------------
<?php
echo number_format(1328370011.724,"8",".", "\0");
Expected result:
----------------
1328370011.72399998
Actual result:
--------------
1
--
Edit bug report at https://bugs.php.net/bug.php?id=60977&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=60977&r=trysnapshot54
Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=60977&r=trysnapshot53
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=60977&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=60977&r=fixed
Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=60977&r=needdocs
Fixed in release: https://bugs.php.net/fix.php?id=60977&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=60977&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=60977&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=60977&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=60977&r=support
Expected behavior: https://bugs.php.net/fix.php?id=60977&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=60977&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=60977&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=60977&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=60977&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=60977&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=60977&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=60977&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=60977&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=60977&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=60977&r=mysqlcfg
Thread (8 messages)
- chobieeee@php.net