ID: 20673 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Verified Bug Type: Scripting Engine problem Operating System: Win 2000 NT/Linux PHP Version: 4.3.0-dev/4.4.0-dev New Comment:
never write something like $a = $a + $a++; if you f.e. try such a construct in C you will get different results depending on the compiler and/or optimisation level. Previous Comments: ------------------------------------------------------------------------ [2002-11-27 07:04:52] [EMAIL PROTECTED] <? $a = 7; $a = $a + $a++; echo $a; //the result is 14; ?> When I add a reference to $a, the behavior of $a + $a++ becomes inexplicable different. Note that $a isn't changed anywhere! <? $a = 7; $b =& $a; $a = $a + $a++; echo $a; //the result is 15; ?> The only difference is $b =& $a, but why $a takes care of references to itself? ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=20673&edit=1