From: [EMAIL PROTECTED] Operating system: RedHat 7.3 PHP version: 4.3.0 PHP Bug Type: *Math Functions Bug description: number_format() output error
There is problem with output from function number_format() I have compiled PHP 4.3.0 as Apache module. print number_format($number,2,"."," "); if $number is in range 100000 - 999999 or 100000000 - 999999999, output has random character at the begining. example: <? $number=850000000.90; $number_f=number_format($number,2,"."," "); for ($i=0;$i<strlen($number_f);$i++) { print ord($number_f[$i])." --> ".$number_f[$i]."<br />"; } print $number_f; ?> produced: 114 --> r 56 --> 8 53 --> 5 48 --> 0 32 --> 48 --> 0 48 --> 0 48 --> 0 32 --> 48 --> 0 48 --> 0 48 --> 0 46 --> . 57 --> 9 48 --> 0 r850 000 000.90 next run of script add this at the beginning: 72 --> H Thank you for your help. Regards Milan -- Edit bug report at http://bugs.php.net/?id=21648&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=21648&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=21648&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=21648&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=21648&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=21648&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=21648&r=support Expected behavior: http://bugs.php.net/fix.php?id=21648&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=21648&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=21648&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=21648&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=21648&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=21648&r=dst IIS Stability: http://bugs.php.net/fix.php?id=21648&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=21648&r=gnused