1--TEST-- 2Bug #47481 (natcasesort() does not sort extended ASCII characters correctly) 3--FILE-- 4<?php 5/* Prototype : bool natcasesort(array &$array_arg) 6 * Description: Sort an array using case-insensitive natural sort 7 * Source code: ext/standard/array.c 8 */ 9 10/* 11 * Test natcasesort() with extended ASCII characters 12 */ 13 14$array = array ('Süden', 'spielen','Sonne','Wind','Regen','Meer'); 15echo "\n-- Before sorting: --\n"; 16var_dump($array); 17 18echo "\n-- After Sorting: --\n"; 19var_dump(natcasesort($array)); 20var_dump($array); 21 22echo "Done"; 23?> 24--EXPECTF-- 25-- Before sorting: -- 26array(6) { 27 [0]=> 28 %string|unicode%(6) "Süden" 29 [1]=> 30 %string|unicode%(7) "spielen" 31 [2]=> 32 %string|unicode%(5) "Sonne" 33 [3]=> 34 %string|unicode%(4) "Wind" 35 [4]=> 36 %string|unicode%(5) "Regen" 37 [5]=> 38 %string|unicode%(4) "Meer" 39} 40 41-- After Sorting: -- 42bool(true) 43array(6) { 44 [5]=> 45 %string|unicode%(4) "Meer" 46 [4]=> 47 %string|unicode%(5) "Regen" 48 [2]=> 49 %string|unicode%(5) "Sonne" 50 [1]=> 51 %string|unicode%(7) "spielen" 52 [0]=> 53 %string|unicode%(6) "Süden" 54 [3]=> 55 %string|unicode%(4) "Wind" 56} 57Done 58