It's not a conditional test.
It's an arithmatic function called autoincrement ( and hencely autodeincrement )
$i++; // return $i then increment it
++$i; // increment $i then return it
thusly if you did:
$i = 20;
$d = $i++; // $i = 21 and $d = 20
$i = 20;
$d = ++$i; // $i = 21 and $d = 21
The same is true of --
if you want to remember which returns which think of it from left to right. $d=$i++; < thus $d = $i THEN you increment it. $d=++$i < thus $d = Increment THEN $i
Hope this helps
you might have seen this in a for loop
for (starting value; condition to end upon; upon each iteration)
hencely on the first iteration $i = 0 - since it retruns THEN increments.
This is used less often now as people prefer to use
for (number .. end )
as a sequence system - but this is because they are normally
just caring about the number of times their iteration gets run - rather than the number of the current iteration.
( btw - excuse the $i's - i'm working my *** of in perl modules right now )
As well as the ++ (increment) and -- (decrement) operators, there are also may operators for manipulating a variable's value relative to its present variable.
e.g. "tmp *= 2" is the same as "tmp = tmp * 2"
Any good reference on JS or C++ should list and explain all of these operators, such as Microsoft's JScript reference (see my sig).