3v4l.org

run code in 300+ PHP versions simultaneously
<?php $objects = [ (object)['Leasing' => 12939.74, 'Name' => 'Jeremy', 'Rental' => 0, 'Sales' => 56603.13, 'Total' => 69542.87], (object)['Leasing' => 0, 'Name' => 'Shaun', 'Rental' => 0, 'Sales' => 58590, 'Total' => 58590], (object)['Leasing' => 0, 'Name' => 'Lindsay', 'Rental' => 0, 'Sales' => 22951.97, 'Total' => 22951.97], (object)['Leasing' => 0, 'Name' => 'Sally', 'Rental' => 1200, 'Sales' => 21624.9, 'Total' => 22824.9], (object)['Leasing' => 0, 'Name' => 'House', 'Rental' => 0, 'Sales' => 16235.81, 'Total' => 16235.81], (object)['Leasing' => 5298.85, 'Name' => 'Bill', 'Rental' => 1200, 'Sales' => 0, 'Total' => 6498.85] ]; array_multisort( array_map(fn($obj) => $obj->Name !== 'House', $objects), array_column($objects, 'Total'), SORT_DESC, $objects ); var_export($objects);

preferences:
30.61 ms | 407 KiB | 5 Q