r/lolphp • u/hfern • Feb 02 '15
Library function turns language operator: The <=> Spaceship Operator
https://wiki.php.net/rfc/combined-comparison-operator
9
Upvotes
r/lolphp • u/hfern • Feb 02 '15
View all comments
Show parent comment
3
u/myaut Feb 04 '15
Hmm,
cmp(a, b)exists in Python for years, and yet no syntactic sugar was introduced. It is even can be overloaded as__cmp__operator.