3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ '=k_0' => ['test1'], 'aA_2' => ['test2'], 'sqA_1' => ['test3'], '=kj_0' => ['test4'], 'awA_2' => ['test5'], '= D_1' => ['test6'], 'sq A_1' => ['test7'], 'sqA_2' => ['test8'], ]; $trans = ['AjawbpfmnrhHxXsSqkgtTdD =', 'abcdefghijklmnopqrstuvwxy']; uksort( $array, function ($a, $b) use ($trans) { return strtr($a, ...$trans) <=> strtr($b, ...$trans); } ); var_export($array);
Output for git.master, git.master_jit, rfc.property-hooks
array ( 'aA_2' => array ( 0 => 'test2', ), 'awA_2' => array ( 0 => 'test5', ), 'sqA_1' => array ( 0 => 'test3', ), 'sqA_2' => array ( 0 => 'test8', ), 'sq A_1' => array ( 0 => 'test7', ), '=k_0' => array ( 0 => 'test1', ), '=kj_0' => array ( 0 => 'test4', ), '= D_1' => array ( 0 => 'test6', ), )

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