From: [EMAIL PROTECTED] Operating system: RH Linux 7.2 PHP version: 4.2.3 PHP Bug Type: Output Control Bug description: incrementing in for loop
there is a problem with for loop code: $a=1; $b=1.5; $step=0.1; for ($i=$a;$i<=$b;$i=$i+$step) { echo "$i<BR>"; } prints: 1 1.1 1.2 1.3 1.4 and 1.5 value is skipped when changing this values to $a=10;$b=15;$step=1; everything is OK (15 is printed) so I guess problem is with floating point values -- Edit bug report at http://bugs.php.net/?id=20692&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=20692&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=20692&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=20692&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=20692&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=20692&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=20692&r=support Expected behavior: http://bugs.php.net/fix.php?id=20692&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=20692&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=20692&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=20692&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=20692&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=20692&r=dst IIS Stability: http://bugs.php.net/fix.php?id=20692&r=isapi