reference/array/functions/uasort.xml
2226ad08fd93e3979efbba47c5ae3545eec97d25
...
...
@@ -9,20 +9,21 @@
9
9
<refsect1 role="description">
10
10
&reftitle.description;
11
11
<methodsynopsis>
12
-
<type>bool</type><methodname>uasort</methodname>
12
+
<type>true</type><methodname>uasort</methodname>
13
13
<methodparam><type>array</type><parameter role="reference">array</parameter></methodparam>
14
-
<methodparam><type>callable</type><parameter>value_compare_func</parameter></methodparam>
14
+
<methodparam><type>callable</type><parameter>callback</parameter></methodparam>
15
15
</methodsynopsis>
16
16
<para>
17
-
This function sorts an array such that array indices maintain their
18
-
correlation with the array elements they are associated with, using a
19
-
user-defined comparison function.
17
+
Sorts <parameter>array</parameter> in place such that its keys
18
+
maintain their correlation with the values they are associated with,
19
+
using a user-defined comparison function.
20
20
</para>
21
21
<para>
22
22
This is used mainly when sorting associative arrays where the actual
23
23
element order is significant.
24
24
</para>
25
25
&note.sort-unstable;
26
+
&note.reset-index;
26
27
</refsect1>
27
28

28
29
<refsect1 role="parameters">
...
...
@@ -38,12 +39,9 @@
38
39
</listitem>
39
40
</varlistentry>
40
41
<varlistentry>
41
-
<term><parameter>value_compare_func</parameter></term>
42
+
<term><parameter>callback</parameter></term>
42
43
<listitem>
43
-
<para>
44
-
See <function>usort</function> and <function>uksort</function> for
45
-
examples of user-defined comparison functions.
46
-
</para>
44
+
&sort.callback.description;
47
45
</listitem>
48
46
</varlistentry>
49
47
</variablelist>
...
...
@@ -53,10 +51,28 @@
53
51
<refsect1 role="returnvalues">
54
52
&reftitle.returnvalues;
55
53
<para>
56
-
&return.success;
54
+
&return.true.always;
57
55
</para>
58
56
</refsect1>
59
57

58
+
<refsect1 role="changelog">
59
+
&reftitle.changelog;
60
+
<informaltable>
61
+
<tgroup cols="2">
62
+
<thead>
63
+
<row>
64
+
<entry>&Version;</entry>
65
+
<entry>&Description;</entry>
66
+
</row>
67
+
</thead>
68
+
<tbody>
69
+
&return.type.true;
70
+
&array.changelog.by-ref;
71
+
</tbody>
72
+
</tgroup>
73
+
</informaltable>
74
+
</refsect1>
75
+

60
76
<refsect1 role="examples">
61
77
&reftitle.examples;
62
78
<para>
...
...
@@ -116,15 +132,14 @@ Array
116
132

117
133
<refsect1 role="seealso">
118
134
&reftitle.seealso;
119
-
<para>
120
-
<simplelist>
121
-
<member><function>usort</function></member>
122
-
<member>&seealso.array.sorting;</member>
123
-
</simplelist>
124
-
</para>
135
+
<simplelist>
136
+
<member><function>usort</function></member>
137
+
<member><function>uksort</function></member>
138
+
<member>&seealso.array.sorting;</member>
139
+
</simplelist>
125
140
</refsect1>
126
-
</refentry>
127
141

142
+
</refentry>
128
143
<!-- Keep this comment at the end of the file
129
144
Local variables:
130
145
mode: sgml
131
146