#18773 [NEW]: Quicksort result is different between Windows and Unix.

From: Date: Wed, 07 Aug 2002 08:46:18 +0000
Subject: #18773 [NEW]: Quicksort result is different between Windows and Unix.
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-16130@lists.php.net to get a copy of this message
From: rgaidot@swt.fr Operating system: Windows 2000 Pro PHP version: 4.2.0 PHP Bug Type: Unknown/Other Function Bug description: Quicksort result is different between Windows and Unix. I have tried to use the sort function on a string array. The array strings include both integer and char characters. (e.g. 0000AER, 000000S0, 00000073) I have noted that the result differs between the two systems Windows and Unix. Indeed the result on Unix is correct, but it is not correct on Windows. I have made a C++ test application in order to compare the results between the two systems and I did not note any problem. <PHPScript_Test> $a=array( array('000000S0','1','5'), array('000000O2','2','4'), array('000000D2','3','3'), array('000000MH','4','2'), array('00000073','5','1') ); echo "<h1>Data</h1>"; echo "<pre>"; var_dump($a); echo "</pre>"; sort($a); echo "<h1>Result</h1>"; echo "<pre>"; var_dump($a); echo "</pre>"; </PHPScript_Test> Thanks, Régis Gaidot -- Edit bug report at http://bugs.php.net/?id=18773&edit=1 -- Fixed in CVS: http://bugs.php.net/fix.php?id=18773&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=18773&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=18773&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=18773&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=18773&r=support Expected behavior: http://bugs.php.net/fix.php?id=18773&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=18773&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=18773&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=18773&r=globals

« previous php.bugs (#16130) next »