variable types
| From: | Mikkel Erup | Date: | Wed, 07 Jun 2000 18:04:51 +0000 |
| Subject: | variable types | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-289@lists.php.net to get a copy of this message | ||
Hi. I use php4 on Windows 2000. I have the following problem, which I hope someone can help me
about.
I use the following:
<?
$a = 1.2;
echo $a;
?>
it states 1 ???
whats the problem. Why doesnt it state 1.2? echo gettype($a); states double, so the type should be
right. Using $a = 1.2e3 or $a = (double) 1.2 gives me the same result. whenever I use doubles in
expressions like $c = ($a * $b); where $a and $b are doubles it seems to be using integer values,
even if I use the cast operator (double).
--
Mikkel Erup