I'm very confused. Here's the simple scenario:
$foo = 1;
$bar = $foo + $foo++;
$bar is 2, as expected. But let's add a line:
$foo = 1;
$baz = &$foo;
$bar = $foo + $foo++;
Now $bar is 3! Did the reference somehow change the operator precedence, or what?
Curiouser and curiouser:
$foo = 1;
$baz = &$foo;
$bar2 = $foo + $foo + $foo++;
$bar2 is also 3! Am I missing something fundamental here?
-AA