Oops, no-perator found. Have a joke instead.
arithmetic
-$a
Negative Number Conversion
Reverse the sign of a number a number.
Tags
$a = '1';
$a = -$a; // -1
$b = '1.2';
$b = -$b; // -1.2
$c = -4;
$c = -$c; // 4
bitwise
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.