3v4l.org

run code in 500+ PHP versions simultaneously
<?php $array = ['s', 'h', 'c', 'b', 'a', 'b', 'd', 'e', 'f', 'f', 'g']; arsort($array); $array = array_count_values($array); arsort($array, SORT_NUMERIC); var_export($array);

preferences:
43.06 ms | 1148 KiB | 5 Q