Bug #78992 [NEW]: Inconsistent sorting
| From: | kfiadeg at gmail dot com | Date: | Wed, 18 Dec 2019 15:07:57 +0000 |
| Subject: | Bug #78992 [NEW]: Inconsistent sorting | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-224395@lists.php.net to get a copy of this message | ||
From: kfiadeg at gmail dot com
Operating system: Linux
PHP version: 7.3.13
Package: Arrays related
Bug Type: Bug
Bug description:Inconsistent sorting
Description:
------------
I've encountered inconsistency with sorting string arrays. Sorting
arrays that have the same set of elements but in different order produce
different results when used with
sort() function (without any flags).
Test script:
---------------
https://pastebin.com/4uKk37by
Expected result:
----------------
If arrays have the same set of elements, performing sort() on each of
them should give the same order of elements for every array.
Actual result:
--------------
After sorting array elements keep different order.
--
Edit bug report at https://bugs.php.net/bug.php?id=78992&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=78992&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=78992&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=78992&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=78992&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=78992&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=78992&r=support
Expected behavior: https://bugs.php.net/fix.php?id=78992&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=78992&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=78992&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=78992&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=78992&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=78992&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=78992&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=78992&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=78992&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=78992&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=78992&r=mysqlcfg