On 10 July 2018 at 12:09, Christoph M. Becker <cmbecke...@gmx.de> wrote:

>
> “xor” is equivalent to ^ (sans the precedence).
>


No, that's a *bitwise* XOR, which is a completely different operation:

var_dump(1 xor 2); // bool(false)
var_dump(1 ^ 2); // int(3)

A consistent logical XOR with the same precedence as || and && could
perhaps be spelled ^^, but there is no such operator in PHP.

Regards,
-- 
Rowan Collins
[IMSoP]

Reply via email to