note 83191 deleted from function.intval by nikic
| From: | nikic@php.net | Date: | Tue, 20 Aug 2013 16:11:15 +0000 |
| Subject: | note 83191 deleted from function.intval by nikic | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-196027@lists.php.net to get a copy of this message | ||
Note Submitter: nobodyisperfect88 at hotmail dot de
----
jay at w3prodigy dot com
25-Mar-2008 09:05
Note:
$int = 0.99999999999999999;
echo intval($int); // returns 1
and
$int = 0.9999999999999999;
echo intval($int); // returns 0
----------------------------------------------------------
^^the first is wrong ... i think it should be called
$int = 1.99999999999999999;
echo intval($int); // returns 1
and not
$int = 0.99999999999999999;
echo intval($int); // returns 1