3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ "Alfa" => ["Temp", "Zeta"], "Teta" => ["Zeta", "Temp"], "Zeta" => ["Temp"], "Temp" => [], ]; asort($array); uasort ($array, function ($a, $b) { return in_array(key($a), $b); }); print_r($array);
Output for git.master, git.master_jit, rfc.property-hooks
Deprecated: uasort(): Returning bool from comparison function is deprecated, return an integer less than, equal to, or greater than zero in /in/KO1Tp on line 12 Array ( [Temp] => Array ( ) [Zeta] => Array ( [0] => Temp ) [Alfa] => Array ( [0] => Temp [1] => Zeta ) [Teta] => Array ( [0] => Zeta [1] => Temp ) )

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:
68.54 ms | 402 KiB | 8 Q