PHP » Operators » XOR

Syntax:
expression1 XOR expression2
expression1
Operand 1.
expression2
Operand 2.

Logical XOR.

This operator is logical XOR.

Examples

Code:
<?php

if (TRUE XOR TRUE)
   print "TRUE!";
else
   print "FALSE!";

?>
Output:
FALSE!
Explanation:

An exclusive OR only evaluates to TRUE when exactly one operand is TRUE.