php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #9356 settype thinks 0.2 and (1.2 - 1) have different values
Submitted: 2001-02-20 15:55 UTC Modified: 2001-10-27 12:10 UTC
From: phpbug01 at smayw dot nask dot com Assigned: hholzgra (profile)
Status: Closed Package: Documentation problem
PHP Version: 4.0.4pl1 OS: Linux 2.2.17
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: phpbug01 at smayw dot nask dot com
New email:
PHP Version: OS:

 

 [2001-02-20 15:55 UTC] phpbug01 at smayw dot nask dot com
http://www.tpsa.com/settype.php
http://www.tpsa.com/settype.phps

it has phpinfo(); in it

sniplet:

$zzz=(10*(10.2-1));
$zzztype=gettype($zzz);
echo "\$zzz = $zzz and is $zzztype<br>";
settype($zzz, "integer");
echo "after settype to integer: \$zzz = $zzz <br>";

$zz=(10*(1.2-1));
$zztype=gettype($zz);
echo "\$zz = $zz and is $zztype<br>";
settype($zz, "integer");
echo "after settype to integer: \$zz = $zz <br>";

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-02-21 05:17 UTC] hholzgra@php.net
the good old rounding problem again 

... have to get what i have written about it and put it into FAQ and manual ...
 [2001-10-27 12:10 UTC] hholzgra@php.net
forgot to close this after i added a warning note 
to the manual some time ago
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Jul 05 04:01:35 2025 UTC