#25982 [Opn->Bgs]: Operator Precedence screwed up from 4.3.2 to 4.3.3?
| From: | iliaa@php.net | Date: | Mon, 27 Oct 2003 22:15:44 +0000 |
| Subject: | #25982 [Opn->Bgs]: Operator Precedence screwed up from 4.3.2 to 4.3.3? | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-49540@lists.php.net to get a copy of this message | ||
ID: 25982
Updated by: iliaa@php.net
Reported By: adiu at adis dot on dot ca
-Status: Open
+Status: Bogus
Bug Type: Unknown/Other Function
Operating System: Linux
PHP Version: 4.3.3
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
This is to be expected.
Previous Comments:
------------------------------------------------------------------------
[2003-10-25 00:42:39] adiu at adis dot on dot ca
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 this bug report at http://bugs.php.net/?id=25982&edit=1