|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2013-12-20 17:36 UTC] bwoebi@php.net
-Status: Open
+Status: Not a bug
[2013-12-20 17:36 UTC] bwoebi@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Dec 13 09:00:01 2025 UTC |
Description: ------------ The Sort_Flags are not realy working. Only SORT_NUMERIC and this on a unexpected way, it loose some values. Your menu to select my phpversion has not my Version includet, so my Version is: 5.4.7 Test script: --------------- $ar = array('rot','gelb','grün','rot','234fw343','blau','gold'); $ar1 = array_unique($ar); $ar2 = array_unique($ar,SORT_REGULAR); $ar3 = array_unique($ar,SORT_NUMERIC); $ar4 = array_unique($ar,SORT_STRING); $ar5 = array_unique($ar,SORT_LOCALE_STRING); print_r($ar1); print_r($ar2); print_r($ar3); print_r($ar4); print_r($ar5); Expected result: ---------------- ### Output #### ##### NOT EXPECTED, this is the unexpected Output ##### Array ( [0] => rot [1] => gelb [2] => grün [4] => 234fw343 [5] => blau [6] => gold ) Array ( [0] => rot [1] => gelb [2] => grün [4] => 234fw343 [5] => blau [6] => gold ) Array ( [0] => rot [4] => 234fw343 ) Array ( [0] => rot [1] => gelb [2] => grün [4] => 234fw343 [5] => blau [6] => gold ) Array ( [0] => rot [1] => gelb [2] => grün [4] => 234fw343 [5] => blau [6] => gold )