3v4l.org

run code in 500+ PHP versions simultaneously
<?php $sortMe = [100, 1, 10, 1000]; function cmp($a, $b) { static $example = [1, 1000, 100, 10]; return array_search($a, $example) - array_search($b, $example); } uasort($sortMe, 'cmp'); var_export($sortMe);
Output for git.master, git.master_jit, rfc.property-hooks
array ( 1 => 1, 3 => 1000, 0 => 100, 2 => 10, )

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:
88.72 ms | 1124 KiB | 4 Q