|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-08-24 22:41 UTC] johannes@php.net
-Status: Open
+Status: Bogus
[2010-08-24 22:41 UTC] johannes@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Sat Mar 14 13:00:01 2026 UTC |
Description: ------------ for different float values in loop (while or for) wrong number of loops. When number si bigger then 4.4 in condition, then one more loop is doing. Test script: --------------- for ($index = 3.1; $index < 4.0; $index += 0.1) { echo $index.'<br />'; } for ($index = 3.1; $index < 4.4; $index += 0.1) { echo $index.'<br />'; } Expected result: ---------------- number is 4.0 = OUTPUT ============== 3.1 3.2 3.3 3.4 3.5 3.6 3.7 3.8 3.9 end is 3.9 number is 4.4 = OUTPUT ============== 3.1 3.2 3.3 3.4 3.5 3.6 3.7 3.8 3.9 4 4.1 4.2 4.3 end is 4.3 Actual result: -------------- number is 4.0 = OUTPUT ============== 3.1 3.2 3.3 3.4 3.5 3.6 3.7 3.8 3.9 end is 3.9 number is 4.4 = OUTPUT ============== 3.1 3.2 3.3 3.4 3.5 3.6 3.7 3.8 3.9 4 4.1 4.2 4.3 4.4 < WRONG end is 4.4 < WRONG