$a = 1; $b = 3; if( $a == 1 XOR $b == 2 ) echo "true"; else if( $a == 1 XOR $b == 3 ) echo "true"; else echo "false";