- array_column: documentation ( source)
- array_multisort: documentation ( source)
- var_export: documentation ( source)
<?php
$array = [
(object) ['ID' => 1, 'name' => 'Mary Jane', 'count' => '420'],
(object) ['ID' => 2, 'name' => 'Johnny', 'count' => '23420'],
(object) ['ID' => 3, 'name' => 'Kathy', 'count' => '4354'],
];
$property = 'count';
array_multisort(array_column($array, $property), $array);
var_export($array);