3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $arr = array_count_values(array('JPG', 'JPG', 'TXT', 'TXT')); arsort($arr); var_dump($arr);
based on B0GIo
Output for 7.0.0 - 7.2.6
array(2) { ["JPG"]=> int(2) ["TXT"]=> int(2) }
Output for 4.3.0 - 5.6.28
array(2) { ["TXT"]=> int(2) ["JPG"]=> int(2) }