3v4l.org

run code in 500+ PHP versions simultaneously
<?php $array = ['a', 'e', 'b', 'c', 'c', 'c', 'e', 'd', 'a', 'b', 'b', 'b', 'b', 'e']; $counts = array_count_values($array); arsort($counts); usort($array, fn($a, $b) => [$counts[$b], $a] <=> [$counts[$a], $b]); var_export($array);
Output for git.master, git.master_jit, rfc.property-hooks
array ( 0 => 'b', 1 => 'b', 2 => 'b', 3 => 'b', 4 => 'b', 5 => 'c', 6 => 'c', 7 => 'c', 8 => 'e', 9 => 'e', 10 => 'e', 11 => 'a', 12 => 'a', 13 => 'd', )

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:
48.63 ms | 1299 KiB | 4 Q