Operators

<=>

Supported By

Syntax

expression <=> expression

Description

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 integers or numbers, the values will be compared numerically. If both given values are dates, the values will be compared chronologically. Otherwise, the values will be compared as strings.

Note

String comparison is case-insensitive. For case-sensitive comparison, use the csstrcmp function.

See Also

cmp, strcmp, csstrcmp