From:             rstoll at tutteli dot ch
Operating system: 
PHP version:      5.4.10
Package:          Scripting Engine problem
Bug Type:         Bug
Bug description:weak logic operator are buggy

Description:
------------
see test script. Seems like the weak logic operators do not have any
effect. 
My PHP version is 5.4.7

Was already mentioned in https://bugs.php.net/bug.php?id=46530&edit=2

Test script:
---------------
$a = false or true;
var_dump($a); //boolean false

$a = true or false;
var_dump($a); //boolean true - that's ok

$a = true xor true;
var_dump($a); //boolean true

$a = false xor true;
var_dump($a); //boolean false

$a = true and false;
var_dump($a); //boolean true

Expected result:
----------------
//or
boolean true
boolean true - this one worked as expected

//xor
boolean false
boolean true

//and
boolean false


-- 
Edit bug report at https://bugs.php.net/bug.php?id=63861&edit=1
-- 
Try a snapshot (PHP 5.4):   
https://bugs.php.net/fix.php?id=63861&r=trysnapshot54
Try a snapshot (PHP 5.3):   
https://bugs.php.net/fix.php?id=63861&r=trysnapshot53
Try a snapshot (trunk):     
https://bugs.php.net/fix.php?id=63861&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=63861&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=63861&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=63861&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=63861&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=63861&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=63861&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=63861&r=notwrong
Not enough info:            
https://bugs.php.net/fix.php?id=63861&r=notenoughinfo
Submitted twice:            
https://bugs.php.net/fix.php?id=63861&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=63861&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=63861&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=63861&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=63861&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=63861&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=63861&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=63861&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=63861&r=mysqlcfg

Reply via email to