Quote:
Originally Posted by Chompy
How I use Xor, is this >_>
PHP Code:
function onCreated() { var1 = "foo"; var2 = "bar"; echo(var1 xor var2 ? 1 : 0); // would return true } /* True = Not alike False = Alike */
|
Quote:
Originally Posted by ApothiX
X_x.. Why are you using xor on strings? That's not how it works :x
|
Might as well be doing be doing "f" xor "b" considering I believe binary operators compare only one binary value (that is, the first binary value per argument)... Not that that piece of code is of any use to anyone (see Okie's post). "f" xor "b" is char(6), whatever that is. char(6) has an ASCII of 6 which is not 0, thus is true...