ID: 19850 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Verified +Status: Closed Bug Type: Arrays related Operating System: Linux + Windows PHP Version: 4CVS-2002-10-10 New Comment:
it works for me: Array ( [0] => A [1] => a [2] => AA [3] => b [4] => B [5] => BB ) Which is exactly what you should get... and the algorithm is platform independent in CVS.... Previous Comments: ------------------------------------------------------------------------ [2002-10-10 10:41:32] [EMAIL PROTECTED] I tried the following script to sort an Array case-sensitive: <?php $test = array("B", "a", "b", "A", "BB", "AA"); usort($test, 'strcasecmp'); print_r($test); ?> What I expected to get was: Array ( [0] => A [1] => a [2] => AA [3] => B [4] => b [5] => BB ) What I got on Win2000/PHP 4.2.4-dev was: Array ( [0] => A [1] => a [2] => AA [3] => b [4] => B [5] => BB ) and using Linux with PHP 4.1.2 I got Array ( [0] => a [1] => A [2] => AA [3] => B [4] => b [5] => BB ) both is not correct. regards Andreas ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=19850&edit=1