#21648 [NEW]: number_format() output error

2003-01-14 Thread bubak
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 10 - 99 or 1 - 9, output
has random character at the begining.

example:
 ".$number_f[$i]."";

}

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




#21648 [Com]: number_format() output error

2003-01-15 Thread bubak
 ID:   21648
 Comment by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Feedback
 Bug Type: *Math Functions
 Operating System: RedHat 7.3
 PHP Version:  4.3.0
 New Comment:

I used file "math.c" from version of PHP 4.3.1-dev before change on
9.1.2003.
It seems to work well


Previous Comments:


[2003-01-15 03:57:34] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip



[2003-01-15 01:58:50] [EMAIL PROTECTED]

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 10 - 99 or 1 - 9, output
has random character at the begining.

example:
 ".$number_f[$i]."";

}

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 this bug report at http://bugs.php.net/?id=21648&edit=1