Spaceship operator
First of all spaceship operator in PHP is represented by opening bracket, equal sign and closing bracket.
It looks like this: <=>
The idea behind this operation is to find if first value is less than, equal to, or greater than second value.
Of course this functionality can be achieved with regular if conditions, it is designed to simplify things.
Comments
Post a Comment