reference/array/functions/shuffle.xml
f781803449007bb0e3a96c693e0eee067f7eb466
...
...
@@ -1,6 +1,6 @@
1
1
<?xml version="1.0" encoding="utf-8"?>
2
2
<!-- $Revision$ -->
3
-
<refentry xml:id="function.shuffle" xmlns="http://docbook.org/ns/docbook">
3
+
<refentry xml:id="function.shuffle" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
4
4
<refnamediv>
5
5
<refname>shuffle</refname>
6
6
<refpurpose>Shuffle an array</refpurpose>
...
...
@@ -8,12 +8,13 @@
8
8
<refsect1 role="description">
9
9
&reftitle.description;
10
10
<methodsynopsis>
11
-
<type>bool</type><methodname>shuffle</methodname>
11
+
<type>true</type><methodname>shuffle</methodname>
12
12
<methodparam><type>array</type><parameter role="reference">array</parameter></methodparam>
13
13
</methodsynopsis>
14
14
<para>
15
15
This function shuffles (randomizes the order of the elements in) an array.
16
16
</para>
17
+
&caution.cryptographically-insecure;
17
18
</refsect1>
18
19
<refsect1 role="parameters">
19
20
&reftitle.parameters;
...
...
@@ -33,9 +34,33 @@
33
34
<refsect1 role="returnvalues">
34
35
&reftitle.returnvalues;
35
36
<para>
36
-
&return.success;
37
+
&return.true.always;
37
38
</para>
38
39
</refsect1>
40
+
<refsect1 role="changelog">
41
+
&reftitle.changelog;
42
+
<para>
43
+
<informaltable>
44
+
<tgroup cols="2">
45
+
<thead>
46
+
<row>
47
+
<entry>&Version;</entry>
48
+
<entry>&Description;</entry>
49
+
</row>
50
+
</thead>
51
+
<tbody>
52
+
<row>
53
+
<entry>7.1.0</entry>
54
+
<entry>
55
+
The internal randomization algorithm <link linkend="migration71.incompatible.rand-srand-aliases">has been changed</link> to use the <link xlink:href="&url.mersenne;">Mersenne Twister</link> Random Number Generator instead of the libc rand function.
56
+
</entry>
57
+
</row>
58
+
</tbody>
59
+
</tgroup>
60
+
</informaltable>
61
+
</para>
62
+
</refsect1>
63
+

39
64
<refsect1 role="examples">
40
65
&reftitle.examples;
41
66
<para>
...
...
@@ -58,18 +83,20 @@ foreach ($numbers as $number) {
58
83
<refsect1 role="notes">
59
84
&reftitle.notes;
60
85
&note.no-key-association;
86
+
&note.reset-index;
61
87
</refsect1>
62
88
<refsect1 role="seealso">
63
89
&reftitle.seealso;
64
90
<para>
65
91
<simplelist>
66
-
<member><function>array_rand</function></member>
92
+
<member><function>Random\Randomizer::shuffleArray</function></member>
93
+
<member><function>Random\Randomizer::shuffleBytes</function></member>
94
+
<member><function>Random\Randomizer::pickArrayKeys</function></member>
67
95
<member>&seealso.array.sorting;</member>
68
96
</simplelist>
69
97
</para>
70
98
</refsect1>
71
99
</refentry>
72
-

73
100
<!-- Keep this comment at the end of the file
74
101
Local variables:
75
102
mode: sgml
76
103