From: adiu at adis dot on dot ca Operating system: Linux PHP version: 4.3.3 PHP Bug Type: Unknown/Other Function Bug description: Operator Precedence screwed up from 4.3.2 to 4.3.3?
Description: ------------ My hosting service recently changed from php-4.3.2 to php-4.3.3. In the process a script broke which had been working fine right up until php-4.3.3. I have a comparison expression where a variable on the left side is compared to an expression which alters the same variable on the right side. See the code details below. Reproduce code: --------------- if ($var == ($var = ereg_replace("^\.", "", $var))) { $replace = true; } else { $replace = false; } Expected result: ---------------- If $var contains "SOMETHING" the expression should be true and if $var contains ".SOMETHING" the expression should be false. Actual result: -------------- The expression is always true, regardless of the content of $var. -- Edit bug report at http://bugs.php.net/?id=25982&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=25982&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=25982&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=25982&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=25982&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=25982&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=25982&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=25982&r=support Expected behavior: http://bugs.php.net/fix.php?id=25982&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=25982&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=25982&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=25982&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25982&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=25982&r=dst IIS Stability: http://bugs.php.net/fix.php?id=25982&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=25982&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=25982&r=float