--TEST-- asort() --SKIPIF-- = 0) die('skip for ICU < 51.2'); ?> --FILE-- 'y' , 'c' => 'i' , 'a' => 'k' ), array( 'a' => 'a' , 'b' => 'aaa', 'c' => 'aa' ), array( 'a' => 'a' , 'aaa'=> 'a' , 'aa' => 'a' ), array( '1' => 'abc', '5' => '!' , '2' => null , '7' => '' ), array( '1' => '100', '2' => '25' , '3' => '36' ), array( '1' => 5 , '2' => '30' , '3' => 2 ) ); $res_str .= sort_arrays( 'en_US', $test_params ); // Sort an array in SORT_STRING mode using en_US locale. $test_params = array( array( '1' => '100', '2' => '25' , '3' => '36' ), array( '1' => 5 , '2' => '30' , '3' => 2 ), array( '1' => 'd' , '2' => '' , '3' => ' a' ), array( '1' => 'y' , '2' => 'k' , '3' => 'i' ) ); $res_str .= sort_arrays( 'en_US', $test_params, Collator::SORT_STRING ); // Sort a non-ASCII array using ru_RU locale. $test_params = array( array( 'п' => 'у', 'б' => 'в', 'е' => 'а' ), array( '1' => 'п', '4' => '', '7' => 'd', '2' => 'пп' ) ); $res_str .= sort_arrays( 'ru_RU', $test_params ); // Sort an array using Lithuanian locale. $test_params = array( array( 'd' => 'y', 'c' => 'i', 'a' => 'k' ) ); $res_str .= sort_arrays( 'lt_LT', $test_params ); return $res_str . "\n"; } include_once( 'ut_common.inc' ); ut_run(); ?> --EXPECT-- Test 1.162b81ac12878b817fc39063097e45b5: array ( 'c' => 'i', 'a' => 'k', 'd' => 'y', ) Result: true Test 2.93d96e22f692d8a281b0a389f01f8d1e: array ( 'a' => 'a', 'c' => 'aa', 'b' => 'aaa', ) Result: true Test 3.9f25de4482bc7b58de508e278113317c: array ( 'aa' => 'a', 'aaa' => 'a', 'a' => 'a', ) Result: true Test 4.a85a41ea78e45b651080cfd98c0b431d: array ( 7 => '', 2 => NULL, 5 => '!', 1 => 'abc', ) Result: true Test 5.99dc71f405b286e03d489061b36e6900: array ( 2 => '25', 3 => '36', 1 => '100', ) Result: true Test 6.bf5bba243307c9d12934e756ad4be190: array ( 3 => 2, 1 => 5, 2 => '30', ) Result: true Test 7.e4ee7024c61476e9e7a6c28b5e47df6f: array ( 1 => '100', 2 => '25', 3 => '36', ) Result: true Test 8.5fa7033dd43784be0db1474eb48b83c8: array ( 3 => 2, 2 => '30', 1 => 5, ) Result: true Test 9.588cdf4692bc09aa92ffe7e48f9e4579: array ( 2 => '', 3 => ' a', 1 => 'd', ) Result: true Test 10.be02641a47ebcccd23e4183ca3a415f7: array ( 3 => 'i', 2 => 'k', 1 => 'y', ) Result: true Test 11.153d9b11d1e5936afc917a94a4e11f34: array ( 'е' => 'а', 'б' => 'в', 'п' => 'у', ) Result: true Test 12.6eaea3fa21b3b7d006ca7dfa27d4e282: array ( 4 => '', 7 => 'd', 1 => 'п', 2 => 'пп', ) Result: true Test 13.8800d48abb960a59002eef77f1d73ae0: array ( 'c' => 'i', 'd' => 'y', 'a' => 'k', ) Result: true