|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2019-08-13 08:35 UTC] requinix@php.net
-Status: Open
+Status: Not a bug
[2019-08-13 08:35 UTC] requinix@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 20:00:01 2025 UTC |
Description: ------------ If you add up 0.30 and 0.15 it and then cast to integer it will end up in 44 instead of 45 Test script: --------------- <?php $test = 0.30 + 0.15; $test2 = ((int)(100 * $test)); echo $test2; Expected result: ---------------- 45 Actual result: -------------- 44