On Tue, Jul 27, 2004 at 02:48:28PM -0500, John Coggeshall wrote: > Notice how 0 and c are switched incorrectly. Attached is a patch to > zend_operators.c that fixes it.
The Manual says: > Warning > > Be carefull when sorting arrays with mixed types values because sort() > can produce unpredictable results. You could use SORT_STRING, natsort, etc... If this gets "fixed", the $a = "0d9"; var_dump(++$a, ++$a); thing could also be "fixed", as its WTF factor is as high... or "010" == "1e1" being true. It's all the consequence of PHPs handling with numbers and strings, which can produce results that strike you as odd. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php