I think the first and second $x would be 6 actually, due to the prepend happening on the second $x.
Here are the steps in order:
1. ++$x: All $x are now 6.
2. 6 + 6 + 6
3. $x++: All $x are now 7.
4. $x = 18: The value from the 6 + 6 + 6 is assigned to $x.
In reply to Re: question 1st - undefined behaviour
by Riales
in thread question 1st - undefined behaviour
by rumos2
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |