All quizzes
PHPCoreFill the blank

Fill in the blank with the operator that makes usort sort ascending by length. It returns -1, 0, or 1 by comparing both sides. What goes in the ____?

<?php
$words = ['ccc', 'a', 'bb'];
usort($words, fn($x, $y) => strlen($x) ____ strlen($y));
// $words is now ['a', 'bb', 'ccc']