php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #43145 Add support for SORT_LOCALE_STRING to array_multisort() function
Submitted: 2007-10-30 16:07 UTC Modified: 2011-07-27 13:34 UTC
Votes:40
Avg. Score:4.5 ± 0.7
Reproduced:34 of 34 (100.0%)
Same Version:20 (58.8%)
Same OS:24 (70.6%)
From: sw at veracomp dot pl Assigned: arpad (profile)
Status: Closed Package: *General Issues
PHP Version: 5.2.4 OS: Linux / Any
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
33 - 30 = ?
Subscribe to this entry?

 
 [2007-10-30 16:07 UTC] sw at veracomp dot pl
Description:
------------
Hi,

I'm writing an application that utilizes the array_multisort function.
We have to sort data in polish language whitch contains non-ASCII characters.

We tried to pass SORT_LOCALE_STRING to the function, but the but it produces warning:

  Argument #3 is an unknown sort flag

We are aware that the Docs says it supports only SORT_STRING, SORT_REGULAR and SORT_NUMERIC flags, but we do need locale sorting.

Please add support for SORT_LOCALE_STRING flag to this function.


Thanks, in advance
Szymon Wilkolazki


Reproduce code:
---------------
array_multisort($columnsArray, SORT_ASC, SORT_LOCALE_STRING, $theDataToBeSorted );

Expected result:
----------------
Table sorted.

Actual result:
--------------
Warning: array_multisort() [function.array-multisort]: Argument #3 is an unknown sort flag in...

Table not sorted.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-07-27 13:34 UTC] arpad@php.net
-Status: Open +Status: Closed -Package: Feature/Change Request +Package: *General Issues -Assigned To: +Assigned To: arpad
 [2011-07-27 13:34 UTC] arpad@php.net
This is implemented in PHP 5.3+ on platforms where strcoll is available.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 30 07:01:28 2024 UTC