Oops, no-perator found. Have a joke instead.
arithmetic
bitwise
null coalescing
$a ??= $b
Null coalescing assignment operator
Reassign the left variable to a value if it's unset or null.
Tags
$name = null;
$name ??= 'Mark'; // Mark
$name = 'Irving';
$name ??= 'Mark'; // Irving
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.