[PHP-DEV] Bug #1960: intval() mangling values From: leon <email protected>
Date: 08/04/99

From: leon <email protected>
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));
?>

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>