The spaceship operator does a comparison where:
- < : Less than
- = : Equal to
- > : Greater than
The value returned is a numeric value indicating the result of the comparison. For string values I believe it does something akin to the
PHP: strcmp - Manual[
^] function, except the values are capped at -1, 0 and 1. The documentation itself stipulates that it should only ever return one of these 3 values. If you wanted the actual, fully compared value then use
strcmp
instead.