#19023 [NEW]: sort of an array is incorrect

From: Date: Wed, 21 Aug 2002 15:37:51 +0000
Subject: #19023 [NEW]: sort of an array is incorrect
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-17455@lists.php.net to get a copy of this message
From: superflow@gmx.ch Operating system: Mac OS Darwin 10.1.5 PHP version: 4.2.1 PHP Bug Type: Arrays related Bug description: sort of an array is incorrect Description after the ksort-function the arraykeyelement 101010501010101010100 ist bigger than 101010501010101010101 hm. Test-Script <?php $sortArray = array ( '101010501010101010101' => '23|10', '101010501010101010100' => '22|9', '101010501010101010000' => '21|8', '101010501010101000000' => '20|7', '101010501010100000000' => '19|6', '101010501010000000000' => '18|5', '101010501000000000000' => '15|4', '101010800000000000000' => '14|3', '101010700000000000000' => '12|3', '101010600000000000000' => '13|3', '101010500000000000000' => '11|3', '101010400000000000000' => '16|3', '101010300000000000000' => '17|3', '101010200000000000000' => '10|3', '101010100000000000000' => '6|3', '102030000000000000000' => '9|2', '102020000000000000000' => '8|2', '102010000000000000000' = > '7|2', '101030000000000000000' => '5|2', '101020000000000000000' => '4|2', '101010000000000000000' = > '2|2', '102000000000000000000' => '3|1', '101000000000000000000' => '1|1' ); var_dump( $sortArray ); ksort( $sortArray ); var_dump( $sortArray ); ?> Configure Command './configure' '--disable-cli' '--with-apxs' '--with-mysql' '--with-pgsql' '--with-gd=/usr/local' '--with-png-dir=/usr/ local' '--with-zlib-dir=/usr' '--with-jpeg-dir=/usr/local' '--with-freetype-dir=/usr/local' '--with-t1lib=/usr/local' '--enable-trans-sid' '--enable-exif' '--with-xml' '-- enable-wddx' '--with-curl=/usr/local' '--with-pdflib=/usr/ local' '--enable-ftp' '--enable-mbstring' '--enable-mbstr- enc-trans' '--with-ldap' '--enable-xslt' '--with-xslt- sablot=/usr/local' '--with-imap=../imap-2001a' '--enable- dbx' '--enable-dbase' '--with-mcrypt=/usr/local' '--enable- sockets' -- Edit bug report at http://bugs.php.net/?id=19023&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=19023&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=19023&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=19023&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=19023&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=19023&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=19023&r=support Expected behavior: http://bugs.php.net/fix.php?id=19023&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=19023&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=19023&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=19023&r=globals

« previous php.bugs (#17455) next »