Bug #1960: intval() mangling values
| From: | leon at clearink dot com | Date: | Wed, 04 Aug 1999 18:27:31 +0000 |
| Subject: | Bug #1960: intval() mangling values | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-9508@lists.php.net to get a copy of this message | ||
From: leon@clearink.com
Operating system: Solaris
PHP version: 3.0.12
PHP Bug Type: Misbehaving function
Bug description: intval() mangling values
<?
print(intval(1.16*100));
?>
This code should return "116", but it returns "115". I can't get it to
mess up any value other than 1.16.
This is the work-around I'm using:
<?
print(intval(1.16*100 + 0.0001));
?>