Possible Duplicate:
Could anyone explain these undefined behaviors (i = i++ + ++i , i = i++, etc…)
I have encountered with a strange problem regards increment operator.
I get different output of same expression in PHP and C.
In C language
main()
{
int i = 5;
printf("%d", i++*i++); // output 25;
}
In PHP
$i = 5;
echo $i++*$i++; // output 30
Can anyone explain this strange behavior? Thanks.