3v4l.org

run code in 500+ PHP versions simultaneously
<?php $array = ['s', 'h', 'c', 'b', 'a', 'b', 'd', 'e', 'f', 'f', 'g']; $counts = array_count_values($array); $array = array_unique($array); usort($array, fn($a, $b) => $counts[$b] <=> $counts[$a]); var_export($array);
Output for git.master_jit, git.master
array ( 0 => 'b', 1 => 'f', 2 => 's', 3 => 'h', 4 => 'c', 5 => 'a', 6 => 'd', 7 => 'e', 8 => 'g', )

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
60.77 ms | 1012 KiB | 4 Q