Heres a table of logic operators used in Javascript, PHP, SQL & Ruby languages for quick cross reference:
| English | Javascript | PHP | SQL | Ruby |
|---|---|---|---|---|
| And | && | and, && | AND | and |
| Or | || | or, || | OR | or |
| Not | ! | ! | NOT | not |
| Xor | ^ | xor | XOR | ^ |
There is also a mega cross language syntax reference.
21 Responses to “Logical Operators cross languages”
hahaha…since when did we use “xor” or “exclusive or” in English?
“I would like this xor that, thank you”
Truth of the matter is that in English when we say “or” we usualy mean logical “xor”, rather than the logical “or”.
I say “cheese xor butter, thank you” all the time! What backward part of the world are you living in… oh, thats right…