class ReportController {
public function complements()
{
$dishes =
[
'a' => ['count' => 200, 'more' => 'qwerty'],
'b' => ['count' => 300, 'more' => 'qwerty'],
'c' => ['count' => 100, 'more' => 'qwerty'],
];
uasort($dishes, [self::class, 'cmp']);
print_r($dishes);
}
private function cmp($a, $b) {
return $a <=> $b;
}
}
(new ReportController)->complements();
https://ideone.com/IuCL8i