|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2015-09-28 20:19 UTC] rasmus@php.net
-Status: Open
+Status: Not a bug
[2015-09-28 20:19 UTC] rasmus@php.net
[2015-09-29 17:46 UTC] mv dot pestov at gmail dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 06 20:00:02 2026 UTC |
Description: ------------ When populating an array with values of type float from loop and then the comparison (==) fails. If create an array using array() this bug not reproduces. Test script: --------------- <?php $array = array(); for($i = 1.4; $i <= 2; $i += 0.2) { $array[] = $i; } if($array[3] == 2) echo 'true'; else echo 'false'; Expected result: ---------------- true Actual result: -------------- false