3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = '[ { "profile_name": "J3S", "post_count": 9 }, { "profile_name": "John", "post_count": 3 }, { "profile_name": "sato", "post_count": 10 } ]'; $array = json_decode($data, true); array_multisort(array_column($array, 'post_count'), SORT_ASC, $array); echo json_encode($array, JSON_PRETTY_PRINT);

preferences:
54.09 ms | 402 KiB | 5 Q