reference/array/functions/krsort.xml
4acad9b77f9422b44aa58266f5fe1585b5bb3fe5
...
...
@@ -8,15 +8,18 @@
8
8
<refsect1 role="description">
9
9
&reftitle.description;
10
10
<methodsynopsis>
11
-
<type>bool</type><methodname>krsort</methodname>
11
+
<type>true</type><methodname>krsort</methodname>
12
12
<methodparam><type>array</type><parameter role="reference">array</parameter></methodparam>
13
13
<methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer><constant>SORT_REGULAR</constant></initializer></methodparam>
14
14
</methodsynopsis>
15
15
<para>
16
-
Sorts an array by key in descending order, maintaining key to data
17
-
correlations. This is useful mainly for associative arrays.
16
+
Sorts <parameter>array</parameter> in place by keys
17
+
in descending order.
18
18
</para>
19
+
&note.sort-unstable;
20
+
&note.reset-index;
19
21
</refsect1>
22
+

20
23
<refsect1 role="parameters">
21
24
&reftitle.parameters;
22
25
<para>
...
...
@@ -33,12 +36,40 @@
33
36
</variablelist>
34
37
</para>
35
38
</refsect1>
39
+

36
40
<refsect1 role="returnvalues">
37
41
&reftitle.returnvalues;
38
42
<para>
39
-
&return.success;
43
+
&return.true.always;
40
44
</para>
41
45
</refsect1>
46
+

47
+
<refsect1 role="changelog">
48
+
&reftitle.changelog;
49
+
<para>
50
+
<informaltable>
51
+
<tgroup cols="2">
52
+
<thead>
53
+
<row>
54
+
<entry>&Version;</entry>
55
+
<entry>&Description;</entry>
56
+
</row>
57
+
</thead>
58
+
<tbody>
59
+
&return.type.true;
60
+
<row>
61
+
<entry>8.2.0</entry>
62
+
<entry>
63
+
This function now does numeric string comparison under
64
+
<constant>SORT_REGULAR</constant> using the standard PHP 8 rules.
65
+
</entry>
66
+
</row>
67
+
</tbody>
68
+
</tgroup>
69
+
</informaltable>
70
+
</para>
71
+
</refsect1>
72
+

42
73
<refsect1 role="examples">
43
74
&reftitle.examples;
44
75
<para>
...
...
@@ -67,16 +98,16 @@ a = orange
67
98
</example>
68
99
</para>
69
100
</refsect1>
101
+

70
102
<refsect1 role="seealso">
71
103
&reftitle.seealso;
72
-
<para>
73
-
<simplelist>
74
-
<member><function>arsort</function></member>
75
-
<member><function>ksort</function></member>
76
-
<member>&seealso.array.sorting;</member>
77
-
</simplelist>
78
-
</para>
104
+
<simplelist>
105
+
<member><function>sort</function></member>
106
+
<member><function>ksort</function></member>
107
+
<member>&seealso.array.sorting;</member>
108
+
</simplelist>
79
109
</refsect1>
110
+

80
111
</refentry>
81
112
<!-- Keep this comment at the end of the file
82
113
Local variables:
83
114