PHP 4.0 Bug #9356: settype thinks 0.2 and (1.2 - 1) have different values
| From: | phpbug01 at smayw dot nask dot com | Date: | Tue, 20 Feb 2001 20:55:08 +0000 |
| Subject: | PHP 4.0 Bug #9356: settype thinks 0.2 and (1.2 - 1) have different values | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-47098@lists.php.net to get a copy of this message | ||
From: phpbug01@smayw.nask.com
Operating system: Linux 2.2.17
PHP version: 4.0.4pl1
PHP Bug Type: Variables related
Bug description: settype thinks 0.2 and (1.2 - 1) have different values
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>";
--
Edit Bug report at: http://bugs.php.net/?id=9356&edit=1