3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array( 'Second', 'First', 'Twentieth', 'Tenth', 'Third', ); $b = array( '2 a', '1 b', '20 c', '10 d', '3 e', ); array_multisort($b, SORT_NATURAL, $a); var_dump($a, $b); array_multisort($b, SORT_LOCALE_STRING, $a); var_dump($a, $b); array_multisort($b, SORT_NATURAL, $a); var_dump($a, SORT_FLAG_CASE, $b);
Output for git.master, git.master_jit, rfc.property-hooks
array(5) { [0]=> string(5) "First" [1]=> string(6) "Second" [2]=> string(5) "Third" [3]=> string(5) "Tenth" [4]=> string(9) "Twentieth" } array(5) { [0]=> string(3) "1 b" [1]=> string(3) "2 a" [2]=> string(3) "3 e" [3]=> string(4) "10 d" [4]=> string(4) "20 c" } array(5) { [0]=> string(5) "First" [1]=> string(5) "Tenth" [2]=> string(6) "Second" [3]=> string(9) "Twentieth" [4]=> string(5) "Third" } array(5) { [0]=> string(3) "1 b" [1]=> string(4) "10 d" [2]=> string(3) "2 a" [3]=> string(4) "20 c" [4]=> string(3) "3 e" } array(5) { [0]=> string(5) "First" [1]=> string(6) "Second" [2]=> string(5) "Third" [3]=> string(5) "Tenth" [4]=> string(9) "Twentieth" } int(8) array(5) { [0]=> string(3) "1 b" [1]=> string(3) "2 a" [2]=> string(3) "3 e" [3]=> string(4) "10 d" [4]=> string(4) "20 c" }

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:
53.78 ms | 403 KiB | 8 Q