PHP 7 had introduced new operator <=> called the Spaceship Operator . so what it does ? what is best use of it ? is it help or increase load of web application ?
<=> is combination of three operator : < (is gretar than ) , > (is less than ) and == (is equal to than)
so it is three way of Combined Comparison in single expression . its called " Combined Comparison "
how <=> react suppose a<=>b than
1. if a and b is equal . it return 0
2. if a is greater than b than it return 1
3. if a is less than b than it return -1
means
a==b , return 0
a>b , return 1
a<b , return -1
in short single expression it check three possibilities . make our code shrink little bit .