3v4l.org

run code in 300+ PHP versions simultaneously
<?php $indexes = [ 'id_1_2_3_0' => 1, 'id_1_2_-0.25_0' => 2, 'id_1_2_1.75_0' => 3, 'id_1_2_-4_0' => 4, 'id_1_2_0_0' => 5, 'id_1_2_-1.25_0' => 6, 'if_1_2_0_0' => 7, 'id_1_3_0_0' => 8, 'id_1_2_0_z' => 9, ]; [$c1, $c2, $c3, $c4, $c5] = array_map(null, ...array_map(fn($k) => explode('_', $k), array_keys($indexes))); array_multisort($c1, $c2, $c3, $c4, $c5, $indexes); var_export($indexes);
Output for git.master, git.master_jit, rfc.property-hooks
array ( 'id_1_2_-4_0' => 4, 'id_1_2_-1.25_0' => 6, 'id_1_2_-0.25_0' => 2, 'id_1_2_0_0' => 5, 'id_1_2_0_z' => 9, 'id_1_2_1.75_0' => 3, 'id_1_2_3_0' => 1, 'id_1_3_0_0' => 8, 'if_1_2_0_0' => 7, )

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