3v4l.org

run code in 300+ PHP versions simultaneously
<?php $assoc = [ 70 => 1, 82 => 5, 61 => 3, 55 => 1, 34 => 2, 53 => 2, 21 => 4, 13 => 5, ]; $arsort = $assoc; arsort($arsort); $keys = array_keys($assoc); array_multisort($assoc, SORT_DESC, range(1, count($assoc)), $keys); $assoc = array_combine($keys, $assoc); print_r(array($assoc, $arsort));
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => Array ( [82] => 5 [13] => 5 [21] => 4 [61] => 3 [34] => 2 [53] => 2 [70] => 1 [55] => 1 ) [1] => Array ( [82] => 5 [13] => 5 [21] => 4 [61] => 3 [34] => 2 [53] => 2 [70] => 1 [55] => 1 ) )

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.73 ms | 402 KiB | 8 Q