expression <=>
expression
The <=>
operator evaluates to the comparison of the two given values. The evaluated value will be negative if the first given value is less than the second given value, positive if the first is greater than the second, and zero if the first is equal to the second.
If both given values are integer
s or number
s, the values will be compared numerically. If both given values are date
s, the values will be compared chronologically. Otherwise, the values will be compared as strings.
String comparison is case-insensitive. For case-sensitive comparison, use the csstrcmp
function.