Oops, no-perator found. Have a joke instead.
arithmetic
bitwise
$a ^= $b
Binary xor assignment
Apply a binary "xor" operation and assign the first variable to the result.
Tags
Related
{
selectOperator(operator.slug);
search = '';
}">
{
selectOperator(operator.slug);
search = '';
}" href="/operators/binary-xor">$a ^ $b {
selectOperator(operator.slug);
search = '';
}" href="/operators/binary-and-assignment">$a &= $b {
selectOperator(operator.slug);
search = '';
}" href="/operators/binary-or-assignment">$a |= $b
// Binary representation: 1100
$a = 12;
// Binary representation: 1010
$b = 10;
// Binary representation 0110:
// 1 XOR 1 = 0
// 1 XOR 0 = 1
// 0 XOR 1 = 1
// 0 XOR 0 = 0
$a ^= $b;
null coalescing
comparison
logical
strings
What is this? Who are you!?
PHP Operators is a reference guide for operators old and new in the PHP programming language. We're SPATIE, a web development agency from Belgium. Besides client work we like to contribute to the open source community and make fun projects like this one.