#42580 [NEW]: number_format arbitrary
| From: | felipe at regex dot pro dot br | Date: | Thu, 06 Sep 2007 15:30:26 +0000 |
| Subject: | #42580 [NEW]: number_format arbitrary | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-117239@lists.php.net to get a copy of this message | ||
From: felipe at regex dot pro dot br
Operating system: Linux
PHP version: 5.2.4
PHP Bug Type: Math related
Bug description: number_format arbitrary
Description:
------------
number_format() accept arbitrary number. This not is a bug?!
Reproduce code:
---------------
php -r "print
number_format(60123498237498274213112321232131313123211312341231231232132132131231212312312800000+1131231891232123211321123213123123213132132173172372173271312023611231231312312213732742374272744723743892357394579379475987230957234098572349587234958273498534721834729817489123647892163490178239471239804712947132418592345232722134798213748921734980127349801273984172983471289347182934721983478123412123456,
2, '', '');"
113123189123212324955467149877809757906281048416538247933974245606043206579547288521269650530917404359646878190387905563922085424503708932548183998822139088398884080392606482537801455313954955380942572389681685321249606629024043336119657124594910849146115016576016960896058277690962398527219045017132308889600
Actual result:
--------------
php -r "print
number_format(60123498237498274213112321232131313123211312341231231232132132131231212312312800000+1131231891232123211321123213123123213132132173172372173271312023611231231312312213732742374272744723743892357394579379475987230957234098572349587234958273498534721834729817489123647892163490178239471239804712947132418592345232722134798213748921734980127349801273984172983471289347182934721983478123412123456,
2, '', '');"
113123189123212324955467149877809757906281048416538247933974245606043206579547288521269650530917404359646878190387905563922085424503708932548183998822139088398884080392606482537801455313954955380942572389681685321249606629024043336119657124594910849146115016576016960896058277690962398527219045017132308889600
--
Edit bug report at http://bugs.php.net/?id=42580&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=42580&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=42580&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=42580&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=42580&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=42580&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=42580&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=42580&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=42580&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=42580&r=support
Expected behavior: http://bugs.php.net/fix.php?id=42580&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=42580&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=42580&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=42580&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=42580&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=42580&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=42580&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=42580&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=42580&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=42580&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=42580&r=mysqlcfg