php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #40900 differed in formating in php5.0.2 with php5.2.0
Submitted: 2007-03-23 10:25 UTC Modified: 2007-03-23 11:52 UTC
From: p dot sivamurugan at gmail dot com Assigned:
Status: Not a bug Package: Strings related
PHP Version: 5.2.1 OS: windows
Private report: No CVE-ID: None
 [2007-03-23 10:25 UTC] p dot sivamurugan at gmail dot com
Description:
------------
php5.0.2
php5.2.0

differed in formating 


Reproduce code:
---------------
echo $vLTVformated  =  "<br>".number_format(0.9800000000000,2,'','');



Expected result:
----------------
php5.0.2 = 98
php5.2.0 = 98


Actual result:
--------------
php5.0.2 = 98
php5.2.0 = 098





Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-03-23 10:58 UTC] tony2001@php.net
The current behaviour is correct.
 [2007-03-23 11:52 UTC] p dot sivamurugan at gmail dot com
then how can i retrive the expected answer 98 from the  code 
echo $vLTVformated  =  "<br>".number_format(0.9800000000000,2,'','');
 in PHP5.2.0
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Feb 25 09:01:26 2024 UTC