Home > PHP > PHP 7 introduces the spaceship (<=>) operator
Bookmark and Share

PHP 7 introduces the spaceship (<=>) operator

Posted on April 19, 2017 | Filed in PHP

So what exactly is the spaceship (<=>) operator?

Return 0 if values on either side are equal
Return 1 if value on the left is greater
Return -1 if the value on the right is greater

Leave a Reply

Contact Us

Big Apple Design Group
134 West 29th Street
Third Floor
New York, NY 10001

[email protected]

Search Blog