note 117841 added to internals2.opcodes.cast
| From: | fodger1975 at gmail dot com | Date: | Tue, 18 Aug 2015 15:07:10 +0000 |
| Subject: | note 117841 added to internals2.opcodes.cast | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-203378@lists.php.net to get a copy of this message | ||
Hi,
Take care about casting.
Casting from float doesn't seem to work properly:
print (int) (( 0.1 + 0.7 ) * 10);
Will return ... 7 ! It should be 8.
Using printf give same result.
----
Server IP: 72.52.91.14
Probable Submitter: 194.2.202.93
----
Manual Page -- http://php.net/manual/en/internals2.opcodes.cast.php
Edit -- https://master.php.net/note/edit/117841
Del: integrated -- https://master.php.net/note/delete/117841/integrated
Del: useless -- https://master.php.net/note/delete/117841/useless
Del: bad code -- https://master.php.net/note/delete/117841/bad+code
Del: spam -- https://master.php.net/note/delete/117841/spam
Del: non-english -- https://master.php.net/note/delete/117841/non-english
Del: in docs -- https://master.php.net/note/delete/117841/in+docs
Del: other reasons-- https://master.php.net/note/delete/117841
Reject -- https://master.php.net/note/reject/117841
Search -- https://master.php.net/manage/user-notes.php