pre-increment and post-increment in PHP
<p>the result of the following statement should give 9 : (using java or js or c++)</p>

<pre><code>i = 1;
i += ++i + i++ + ++i;
//i = 9 now
</code></pre>

<p>but in php </p>

<p>the same statements will give 12 ?!</p>

<pre><code>$i = 1;
$i +=  ++$i + $i++ + ++$i;
echo $i;
</code></pre>

<p>is this a bug or can anyone explain why ?</p>
