note 83191 added to function.intval
| From: | nobodyisperfect88 at hotmail dot de | Date: | Wed, 14 May 2008 18:46:02 +0000 |
| Subject: | note 83191 added to function.intval | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-139389@lists.php.net to get a copy of this message | ||
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
----
Server IP: 212.124.37.9
Probable Submitter: 80.135.46.92
----
Manual Page -- http://www.php.net/manual/en/function.intval.php
Edit -- https://master.php.net/note/edit/83191
Del: integrated -- https://master.php.net/note/delete/83191/integrated
Del: useless -- https://master.php.net/note/delete/83191/useless
Del: bad code -- https://master.php.net/note/delete/83191/bad+code
Del: spam -- https://master.php.net/note/delete/83191/spam
Del: non-english -- https://master.php.net/note/delete/83191/non-english
Del: in docs -- https://master.php.net/note/delete/83191/in+docs
Del: other reasons-- https://master.php.net/note/delete/83191
Reject -- https://master.php.net/note/reject/83191
Search -- https://master.php.net/manage/user-notes.php