|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-10-27 17:15 UTC] iliaa@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Dec 02 21:00:01 2025 UTC |
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.