3v4l.org

run code in 300+ PHP versions simultaneously
<?php $clans = array('1:50', '2:50', '3:33', '4:100'); usort($clans, function($a, $b) { list($nameA, $scoreA) = explode(':', $a); list($nameB, $scoreB) = explode(':', $b); if ($scoreA == $scoreB) { return 0; } else { return $scoreA < $scoreB ? 1 : -1; } }); var_dump($clans);
Output for git.master, git.master_jit, rfc.property-hooks
array(4) { [0]=> string(5) "4:100" [1]=> string(4) "1:50" [2]=> string(4) "2:50" [3]=> string(4) "3:33" }

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:
43.11 ms | 401 KiB | 8 Q