Operators

cmp

Supported By

Syntax

expression cmp expression

Description

The cmp operator evaluates to the comparison of the two given values as strings. 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.

Note

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

Synonym

compared to

See Also

<=>