php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #8020 return wrong value
Submitted: 2000-11-28 19:40 UTC Modified: 2000-11-29 05:59 UTC
From: bate at bate dot de Assigned:
Status: Closed Package: Strings related
PHP Version: 4.0.0 OS: SuSE 7.0
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: bate at bate dot de
New email:
PHP Version: OS:

 

 [2000-11-28 19:40 UTC] bate at bate dot de
<?
$TOTAL=1999999999999999999999999999999999999999999999; 
echo "Total: \$".number_format($TOTAL,2,',','.'); 
?>

return =>

Total: $1.999.999.999.999.999.859.514.578.049.071.102.439.861.518.336,00 

and he doest round correct.

Same prob under 4.0.3pl1

cu Bat[e]

Patches

Pull Requests

Pull requests:

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-11-29 05:59 UTC] stas@php.net
PHP does not support numbers so long. You may try to use new
GMP extension or format the number manually. 
 [2022-08-03 21:33 UTC] JustPlayingYRU2 at gmail dot com
The following pull request has been associated:

Patch Name: Generate int/float/null instead of integer/double/NULL in docgen.php
On GitHub:  https://github.com/php/doc-base/pull/45
Patch:      https://github.com/php/doc-base/pull/45.patch
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Oct 08 15:01:27 2024 UTC