mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 16:38:54 +00:00
documented the change in behaviour due to aliasing of rand to mt_rand in PHP 7.1.0
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@341933 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
f14ec684d3
commit
ce3996c403
5 changed files with 114 additions and 8 deletions
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xml:id="function.array-rand" xmlns="http://docbook.org/ns/docbook">
|
||||
<refentry xml:id="function.array-rand" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>array_rand</refname>
|
||||
<refpurpose>Pick one or more random entries out of an array</refpurpose>
|
||||
|
@ -64,6 +64,14 @@
|
|||
<entry>&Description;</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>7.1.0</entry>
|
||||
<entry>
|
||||
<link linkend="migration71.incompatible.rand-srand-aliases">The internal randomization algorithm has been changed to use the <link xlink:href="&url.mersenne;">Mersenne Twister</link> Random Number Generator instead of the libc rand function.</link>
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>5.2.10</entry>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xml:id="function.shuffle" xmlns="http://docbook.org/ns/docbook">
|
||||
<refentry xml:id="function.shuffle" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>shuffle</refname>
|
||||
<refpurpose>Shuffle an array</refpurpose>
|
||||
|
@ -39,6 +39,30 @@
|
|||
&return.success;
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="changelog">
|
||||
&reftitle.changelog;
|
||||
<para>
|
||||
<informaltable>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>&Version;</entry>
|
||||
<entry>&Description;</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>7.1.0</entry>
|
||||
<entry>
|
||||
<link linkend="migration71.incompatible.rand-srand-aliases">The internal randomization algorithm has been changed to use the <link xlink:href="&url.mersenne;">Mersenne Twister</link> Random Number Generator instead of the libc rand function.</link>
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
|
|
|
@ -34,6 +34,9 @@
|
|||
<function>mt_rand</function> instead.
|
||||
</simpara>
|
||||
</note>
|
||||
<note><simpara>As of PHP 7.1.0, <function>rand</function> has been made
|
||||
an alias of <function>mt_rand</function>.</simpara>
|
||||
</note>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
|
@ -65,6 +68,29 @@
|
|||
(or 0) and <parameter>max</parameter> (or <function>getrandmax</function>, inclusive).
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="changelog">
|
||||
&reftitle.changelog;
|
||||
<para>
|
||||
<informaltable>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>&Version;</entry>
|
||||
<entry>&Description;</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>7.1.0</entry>
|
||||
<entry>
|
||||
<link linkend="migration71.incompatible.rand-srand-aliases"><function>rand</function> has been made an alias of <function>mt_rand</function>.</link>
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
|
@ -91,7 +117,7 @@ echo rand(5, 15);
|
|||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
||||
<refsect1 role="notes">
|
||||
&reftitle.notes;
|
||||
<warning>
|
||||
|
@ -103,7 +129,7 @@ echo rand(5, 15);
|
|||
</para>
|
||||
</warning>
|
||||
</refsect1>
|
||||
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
|
|
|
@ -17,7 +17,9 @@
|
|||
</para>
|
||||
|
||||
¬e.randomseed;
|
||||
|
||||
<note><simpara>As of PHP 7.1.0, <function>srand</function> has been made
|
||||
an alias of <function>mt_srand</function>.</simpara>
|
||||
</note>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
|
@ -41,7 +43,29 @@
|
|||
&return.void;
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="changelog">
|
||||
&reftitle.changelog;
|
||||
<para>
|
||||
<informaltable>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>&Version;</entry>
|
||||
<entry>&Description;</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>7.1.0</entry>
|
||||
<entry>
|
||||
<link linkend="migration71.incompatible.rand-srand-aliases"><function>srand</function> has been made an alias of <function>mt_srand</function>.</link>
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.str-shuffle">
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="function.str-shuffle">
|
||||
<refnamediv>
|
||||
<refname>str_shuffle</refname>
|
||||
<refpurpose>Randomly shuffles a string</refpurpose>
|
||||
|
@ -41,7 +41,31 @@
|
|||
Returns the shuffled string.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
||||
<refsect1 role="changelog">
|
||||
&reftitle.changelog;
|
||||
<para>
|
||||
<informaltable>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>&Version;</entry>
|
||||
<entry>&Description;</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>7.1.0</entry>
|
||||
<entry>
|
||||
<link linkend="migration71.incompatible.rand-srand-aliases">The internal randomization algorithm has been changed to use the <link xlink:href="&url.mersenne;">Mersenne Twister</link> Random Number Generator instead of the libc rand function.</link>
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
|
|
Loading…
Reference in a new issue