++$i / $i++ always run after the loop, that is means result of loop are equal to:
$i = 0;
while ($i < 5) {
if ($i != 2) {
print "$i";
}
$i++; // ++$i
}
In case we add the "print" to loop parameters the result will be different:
for ($i = 0; $i < 5; print ++$i) { } // 12345
Login in to like
Login in to comment