The spaceship operator is a comparator, not a comparison

<=> returns -1, 0 or 1, which makes it useless as a boolean and exactly right as the body of a usort() callback — the place where hand-written comparators get the equality case wrong and produce an unstable sort.

// the classic bug: no zero case, so equal elements shuffle
usort($rows, function ($a, $b) { return $a->price > $b->price; });

usort($rows, function ($a, $b) { return $a->price <=> $b->price; });

// multi-key, in the order written
usort($rows, function ($a, $b) {
    return [$a->brand, $a->price] <=> [$b->brand, $b->price];
});

The array form is the one worth remembering: arrays compare element by element, so a two-key sort needs no nested ternary. It follows the same comparison rules as ==, which means comparing mixed types produces the same surprises it always did — sort a list of strings and integers and the result is defined but not what anyone wanted.