my question operator related. today studied operators. having confusion. in php difference between "or" , "xor". know both of them related boolean expression. can't find original difference.
anyone please understand more clearly.
it has mutual exclusion. xor
exclusive. or
inclusive.
truth table comparison
$x $y ($x or $y) ($x xor $y) 0 0 0 0 1 0 1 1 0 1 1 1 1 1 1 0
note: difference in last case. xor
true when either $x
or $y
true, not both (as case or
).
Comments
Post a Comment