php-7 Simple Example


Example

$a = 5;
$b = 10;

$a <=> $a; // 0, because $a == $a
$a <=> $b; // -1, because $a < $b
$b <=> $a; // 1, because $b > $a