3v4l.org

run code in 300+ PHP versions simultaneously
<?php $yourArray = [ ['item1' => 80], ['item2' => 25], ['item3' => 85], ]; function cmp($a, $b) { $a = reset($a); // get the first array elements $b = reset($b); // for comparison. if ($a == $b) { return 0; } return ($a < $b) ? -1 : 1; } usort($yourArray, "cmp"); print_r($yourArray);

preferences:
26.38 ms | 406 KiB | 5 Q