3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [ "89098"=> "one", "aaaa123" => "two", "9" => "three", 5 => "four", "7!?2,,--" => "five", ]; uksort($arr, function($a, $b){ return $a > $b; }); var_dump($arr); uksort($arr, function($a, $b){ $a = str_rot13($a); $b = str_rot13($b); return strcmp($a, $b); }); var_dump($arr);
Output for git.master, git.master_jit, rfc.property-hooks
Deprecated: uksort(): Returning bool from comparison function is deprecated, return an integer less than, equal to, or greater than zero in /in/OTC4k on line 11 array(5) { [5]=> string(4) "four" ["7!?2,,--"]=> string(4) "five" [9]=> string(5) "three" [89098]=> string(3) "one" ["aaaa123"]=> string(3) "two" } array(5) { [5]=> string(4) "four" ["7!?2,,--"]=> string(4) "five" [89098]=> string(3) "one" [9]=> string(5) "three" ["aaaa123"]=> string(3) "two" }

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:
45.05 ms | 406 KiB | 5 Q