The spaceship operator
This is a spaceship operator: "<=> ". It's still being discussed but there's a big chance you'll get to use it in PHP7.
The operator returns 0 if both operands are equal, 1 if the left is greater, and -1 if the right is greater.
Instead of this
function order_func($a, $b) {
return ($a < $b) ? -1 : (($a > $b) ? 1 : 0);
}
you can do
function order_func($a, $b) {
return $a <=> $b;
}