Pre-increment as a statement doesn't generate proper code: ++$i; should generate the same code as: $i++;