This isn't a bug. All those strings evaluate to 0.
You should use a sort() function which is suitable.
At 02:48 PM 7/27/2004 -0500, John Coggeshall wrote:
Consider the following:
<?php $a = array('a', 'b', 'c', 'a'=>0, 'b'=>1, 'c'=>2);
sort($a);
print_r($a);
?>
This produces a bogus output:
Array
(
[0] => a
[1] => b
[2] => 0
[3] => c
[4] => 1
[5] => 2
)
Notice how 0 and c are switched incorrectly. Attached is a patch to
zend_operators.c that fixes it.
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php