Last active
September 15, 2020 01:03
-
-
Save design-innovations/a77bdf3d976b826c893d3720827ec206 to your computer and use it in GitHub Desktop.
PHP - Spaceship operator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
echo 1 <=> 2; // returns -1 | |
echo 1 <=> 1; // returns 0 | |
echo 2 <=> 1; // returns 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment