strange behaviour of php
<p>Today I noticed an ambiguity in php. I ran this code</p>

<pre><code>$i = 5;
$i = $i ++;
var_dump($i); //output 5 instead of 6 
</code></pre>

<p>Let us assume the initial value of <code>$i is 5</code>. Now the new value should be 6 but it in fact turns out to be <code>5</code>. When I did the same thing in <code>C++</code> I got <code>6</code> as expected.
Is it some bug in php which went unnoticed for so many years or is it some thing else. Can some one please explain it?</p>
