reference/array/sorting.xml
d1df62fe77b6cb0676d064e8e63ee2c3304d4260
...
...
@@ -22,16 +22,17 @@
22
22
numerically (0,1,2 ...)
23
23
</member>
24
24
<member>
25
-
The order of the sort: alphabetical, low to high (ascending),
26
-
high to low (descending), numerical, natural, random, or user defined
25
+
The order of the sort: alphabetical, ascending (low to high),
26
+
descending (high to low), natural, random, or user defined
27
27
</member>
28
28
<member>
29
29
Note: All of these sort functions act directly on the array
30
30
variable itself, as opposed to returning a new sorted array
31
31
</member>
32
32
<member>
33
-
If any of these sort functions evaluates two members as equal then the
34
-
order is undefined (the sorting is not stable).
33
+
If any of these sort functions evaluates two members as equal
34
+
then they retain their original order.
35
+
Prior to PHP 8.0.0, their order were undefined (the sorting was not stable).
35
36
</member>
36
37
</simplelist>
37
38
</para>
...
...
@@ -52,7 +53,7 @@
52
53
<row>
53
54
<entry><function>array_multisort</function></entry>
54
55
<entry>value</entry>
55
-
<entry>associative yes, numeric no</entry>
56
+
<entry><type>string</type> keys yes, <type>int</type> keys no</entry>
56
57
<entry>first array or sort options</entry>
57
58
<entry><function>array_walk</function></entry>
58
59
</row>
...
...
@@ -60,29 +61,29 @@
60
61
<entry><function>asort</function></entry>
61
62
<entry>value</entry>
62
63
<entry>yes</entry>
63
-
<entry>low to high</entry>
64
+
<entry>ascending</entry>
64
65
<entry><function>arsort</function></entry>
65
66
</row>
66
67
<row>
67
68
<entry><function>arsort</function></entry>
68
69
<entry>value</entry>
69
70
<entry>yes</entry>
70
-
<entry>high to low</entry>
71
+
<entry>descending</entry>
71
72
<entry><function>asort</function></entry>
72
73
</row>
73
74
<row>
74
75
<entry><function>krsort</function></entry>
75
76
<entry>key</entry>
76
77
<entry>yes</entry>
77
-
<entry>high to low</entry>
78
+
<entry>descending</entry>
78
79
<entry><function>ksort</function></entry>
79
80
</row>
80
81
<row>
81
82
<entry><function>ksort</function></entry>
82
83
<entry>key</entry>
83
84
<entry>yes</entry>
84
-
<entry>low to high</entry>
85
-
<entry><function>asort</function></entry>
85
+
<entry>ascending</entry>
86
+
<entry><function>krsort</function></entry>
86
87
</row>
87
88
<row>
88
89
<entry><function>natcasesort</function></entry>
...
...
@@ -102,7 +103,7 @@
102
103
<entry><function>rsort</function></entry>
103
104
<entry>value</entry>
104
105
<entry>no</entry>
105
-
<entry>high to low</entry>
106
+
<entry>descending</entry>
106
107
<entry><function>sort</function></entry>
107
108
</row>
108
109
<row>
...
...
@@ -116,7 +117,7 @@
116
117
<entry><function>sort</function></entry>
117
118
<entry>value</entry>
118
119
<entry>no</entry>
119
-
<entry>low to high</entry>
120
+
<entry>ascending</entry>
120
121
<entry><function>rsort</function></entry>
121
122
</row>
122
123
<row>
...
...
@@ -166,4 +167,3 @@ vim600: syn=xml fen fdm=syntax fdl=2 si
166
167
vim: et tw=78 syn=sgml
167
168
vi: ts=1 sw=1
168
169
-->
169
-

170
170