ID:               32196
 Updated by:       [EMAIL PROTECTED]
 Reported By:      the_deppchef at hotmail dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         Zend Engine 2 problem
 Operating System: Linux 2.4.27 (Debian)
 PHP Version:      4CVS-2005-03-05 (stable)
 New Comment:

No bug -> bogus.


Previous Comments:
------------------------------------------------------------------------

[2005-03-05 02:06:37] the_deppchef at hotmail dot com

Uhm, sorry, my fault :(

Did this change recently? I really had it in mind the other way round
:(

------------------------------------------------------------------------

[2005-03-05 02:01:15] the_deppchef at hotmail dot com

Description:
------------
Operator Precedence doesn't seem to work as in earlier
versions/expected.
Following
http://de.php.net/manual/en/language.operators.php#language.operators.precedence
&& should have a higher priority than "or" and || should have a higher
priority than "and".
It doesn't work anymore..

Reproduce code:
---------------
<?php
$foo1=1;
$foo2=1;
$foo3=0;
if($foo1==0 && $foo2==0 or $foo3==0){
        echo '<br>This should not happen';
}else{
        echo '<br>This should happen';
}
$bar1=0;
$bar2=1;
$bar3=1;
if($bar1==0 || $bar2==0 and $bar3==0){
        echo '<br>This should happen';
}else{
        echo '<br>This should not happen';
}
?>

Expected result:
----------------
This should happen
This should happen

Actual result:
--------------
This should not happen
This should not happen


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=32196&edit=1

Reply via email to