From ce3996c4034836382ce768d3eea655138738e045 Mon Sep 17 00:00:00 2001 From: Maciek Sokolewicz Date: Mon, 20 Feb 2017 22:01:10 +0000 Subject: [PATCH] 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 --- reference/array/functions/array-rand.xml | 10 ++++++- reference/array/functions/shuffle.xml | 26 +++++++++++++++++- reference/math/functions/rand.xml | 30 +++++++++++++++++++-- reference/math/functions/srand.xml | 28 +++++++++++++++++-- reference/strings/functions/str-shuffle.xml | 28 +++++++++++++++++-- 5 files changed, 114 insertions(+), 8 deletions(-) diff --git a/reference/array/functions/array-rand.xml b/reference/array/functions/array-rand.xml index 0aeef04cc5..e546b464d5 100644 --- a/reference/array/functions/array-rand.xml +++ b/reference/array/functions/array-rand.xml @@ -1,6 +1,6 @@ - + array_rand Pick one or more random entries out of an array @@ -64,6 +64,14 @@ &Description; + + + 7.1.0 + + The internal randomization algorithm has been changed to use the Mersenne Twister Random Number Generator instead of the libc rand function. + + + 5.2.10 diff --git a/reference/array/functions/shuffle.xml b/reference/array/functions/shuffle.xml index 025c714a5a..b37041905b 100644 --- a/reference/array/functions/shuffle.xml +++ b/reference/array/functions/shuffle.xml @@ -1,6 +1,6 @@ - + shuffle Shuffle an array @@ -39,6 +39,30 @@ &return.success; + + &reftitle.changelog; + + + + + + &Version; + &Description; + + + + + 7.1.0 + + The internal randomization algorithm has been changed to use the Mersenne Twister Random Number Generator instead of the libc rand function. + + + + + + + + &reftitle.examples; diff --git a/reference/math/functions/rand.xml b/reference/math/functions/rand.xml index 814dcc0c98..c818cb597d 100644 --- a/reference/math/functions/rand.xml +++ b/reference/math/functions/rand.xml @@ -34,6 +34,9 @@ mt_rand instead. + As of PHP 7.1.0, rand has been made + an alias of mt_rand. + &reftitle.parameters; @@ -65,6 +68,29 @@ (or 0) and max (or getrandmax, inclusive). + + &reftitle.changelog; + + + + + + &Version; + &Description; + + + + + 7.1.0 + + rand has been made an alias of mt_rand. + + + + + + + &reftitle.examples; @@ -91,7 +117,7 @@ echo rand(5, 15); - + &reftitle.notes; @@ -103,7 +129,7 @@ echo rand(5, 15); - + &reftitle.seealso; diff --git a/reference/math/functions/srand.xml b/reference/math/functions/srand.xml index e863926655..f050a25b81 100644 --- a/reference/math/functions/srand.xml +++ b/reference/math/functions/srand.xml @@ -17,7 +17,9 @@ ¬e.randomseed; - + As of PHP 7.1.0, srand has been made + an alias of mt_srand. + &reftitle.parameters; @@ -41,7 +43,29 @@ &return.void; - + + &reftitle.changelog; + + + + + + &Version; + &Description; + + + + + 7.1.0 + + srand has been made an alias of mt_srand. + + + + + + + &reftitle.examples; diff --git a/reference/strings/functions/str-shuffle.xml b/reference/strings/functions/str-shuffle.xml index 7b5a66678d..7dd4fac16f 100644 --- a/reference/strings/functions/str-shuffle.xml +++ b/reference/strings/functions/str-shuffle.xml @@ -1,6 +1,6 @@ - + str_shuffle Randomly shuffles a string @@ -41,7 +41,31 @@ Returns the shuffled string. - + + + &reftitle.changelog; + + + + + + &Version; + &Description; + + + + + 7.1.0 + + The internal randomization algorithm has been changed to use the Mersenne Twister Random Number Generator instead of the libc rand function. + + + + + + + + &reftitle.examples;