1--TEST-- 2Test array_multisort() function : natural sorting 3--FILE-- 4<?php 5echo "*** Testing array_multisort() : natural sorting\n"; 6 7$a = array( 8 'Second', 9 'First', 10 'Twentieth', 11 'Tenth', 12 'Third', 13); 14 15$b = array( 16 '2 a', 17 '1 b', 18 '20 c', 19 '10 d', 20 '3 e', 21); 22 23array_multisort($b, SORT_NATURAL, $a); 24 25var_dump($a, $b); 26 27?> 28--EXPECT-- 29*** Testing array_multisort() : natural sorting 30array(5) { 31 [0]=> 32 string(5) "First" 33 [1]=> 34 string(6) "Second" 35 [2]=> 36 string(5) "Third" 37 [3]=> 38 string(5) "Tenth" 39 [4]=> 40 string(9) "Twentieth" 41} 42array(5) { 43 [0]=> 44 string(3) "1 b" 45 [1]=> 46 string(3) "2 a" 47 [2]=> 48 string(3) "3 e" 49 [3]=> 50 string(4) "10 d" 51 [4]=> 52 string(4) "20 c" 53} 54