ID: 10332 Comment by: FACIAL-EXCLUSIVE358 at hotmail dot com Reported By: laurent_tourreau at ifrance dot com Status: Bogus Bug Type: Scripting Engine problem Operating System: Slackware 7.1 Linux 2.2.16 PHP Version: 4.0.4pl1 New Comment:
<a href=http://www.geocities.com/fghglydgv7410/>EXCLUSIVE FACIAL</a> Previous Comments: ------------------------------------------------------------------------ [2001-04-28 19:32:43] [EMAIL PROTECTED] The "==" has higher precedence than does "xor," so evaluating left to right we have: $h == 4 xor $i == 5 xor $j == 6 or: true xor true xor true then: false xor true and finally: true which is true, which is expected behavior. Use parens to group the exressions to get the results you are looking for. Sean ------------------------------------------------------------------------ [2001-04-15 05:39:10] laurent_tourreau at ifrance dot com <?php $h = 4; $i =5, $j=6; if ($h == 4 xor $i == 5 xor $j == 6) { echo ("The condition is true"); } else { echo ("The condition is false"); } ?> When i run it, i obtain The condition is true... Im running PHP as Apache module. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=10332&edit=1
