http://qs1969.pair.com?node_id=347100


in reply to Mysterious for behavior

The comma operator in this case is presenting a list of three elements to the initializer of the for operator. If you had something like this:

for ($i=3, $i=2, $i=1, $i=0)
you would get four lines, because there are four elements.

It is printing "1" for each input because the initializer list is evaulated before the iteration. Therefore, $i is set to one before the for operator iterates over the three element list.