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
And I wonder how does the operator ^
work here?Explanations with clarity would be greatly appreciated!