Skip to content

Instantly share code, notes, and snippets.

@design-innovations
Last active September 15, 2020 01:03
Show Gist options
  • Save design-innovations/a77bdf3d976b826c893d3720827ec206 to your computer and use it in GitHub Desktop.
Save design-innovations/a77bdf3d976b826c893d3720827ec206 to your computer and use it in GitHub Desktop.
PHP - Spaceship operator
<?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