There's 1 thing you should keep in mind
PHP Code:
int i = 0;
if (++i == 0) {
// do something
}
vs
PHP Code:
int i = 0;
if (i++ == 0) {
// do something
}
The first is always false because it starts at 1 and the second is true because it starts at 0.
So the first script should be
PHP Code:
int i = 0;
if (++i == 1) {
// do something
}
I don't know if this is with all compilers, but you should check.