I\'m a little confused when I see the output of following code:
$x = \"a\"; $y = \"b\"; $x ^= $y; $y ^= $x; $x ^= $y; echo $x; //Got b echo $y; //Got a
Th ^ operator is a bitwise operator, meaning that it operates on every bit of its operands.
^
It returns a value in which each bit is 1 if the two corresponding bits in the operands are unequal, and 0 if they're equal.
1
0
For example:
100110110 ^ 010001100 = 110111010