reference/array/functions/sort.xml
2ca090342977839edca2f7f4e52305a1b5da6095
...
...
@@ -8,15 +8,19 @@
8
8
<refsect1 role="description">
9
9
&reftitle.description;
10
10
<methodsynopsis>
11
-
<type>bool</type><methodname>sort</methodname>
11
+
<type>true</type><methodname>sort</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
-
This function sorts an array by value in ascending order.
16
+
Sorts <parameter>array</parameter> in place by values
17
+
in ascending order.
17
18
</para>
18
19
&note.sort-unstable;
20
+
&note.no-key-association;
21
+
&note.reset-index;
19
22
</refsect1>
23
+

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

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

48
+
<refsect1 role="changelog">
49
+
&reftitle.changelog;
50
+
<para>
51
+
<informaltable>
52
+
<tgroup cols="2">
53
+
<thead>
54
+
<row>
55
+
<entry>&Version;</entry>
56
+
<entry>&Description;</entry>
57
+
</row>
58
+
</thead>
59
+
<tbody>
60
+
&return.type.true;
61
+
</tbody>
62
+
</tgroup>
63
+
</informaltable>
40
64
</para>
41
65
</refsect1>
66
+

42
67
<refsect1 role="examples">
43
68
&reftitle.examples;
44
69
<para>
...
...
@@ -105,9 +130,9 @@ fruits[3] = orange20
105
130
The fruits have been sorted like <function>natcasesort</function>.
106
131
</para>
107
132
</refsect1>
133
+

108
134
<refsect1 role="notes">
109
135
&reftitle.notes;
110
-
&note.no-key-association;
111
136
<note>
112
137
<simpara>
113
138
Like most PHP sorting functions, <function>sort</function> uses an
...
...
@@ -122,20 +147,19 @@ fruits[3] = orange20
122
147
<simpara>
123
148
Be careful when sorting arrays with mixed types values because
124
149
<function>sort</function> can produce unexpected results,
125
-
if <parameter>flags</parameter> is <constant>SORT_REGULAR</constant>,
150
+
if <parameter>flags</parameter> is <constant>SORT_REGULAR</constant>.
126
151
</simpara>
127
152
</warning>
128
153
</refsect1>
154
+

129
155
<refsect1 role="seealso">
130
156
&reftitle.seealso;
131
-
<para>
132
-
<simplelist>
133
-
<member><function>asort</function></member>
134
-
<member><function>rsort</function></member>
135
-
<member>&seealso.array.sorting;</member>
136
-
</simplelist>
137
-
</para>
157
+
<simplelist>
158
+
<member><function>rsort</function></member>
159
+
<member>&seealso.array.sorting;</member>
160
+
</simplelist>
138
161
</refsect1>
162
+

139
163
</refentry>
140
164
<!-- Keep this comment at the end of the file
141
165
Local variables:
142
166