[prev in list] [next in list] [prev in thread] [next in thread]
List: php-doc-cvs
Subject: [DOC-CVS] [doc-en] master: random: Add description to extension constants (#2018)
From: Tim_Düsterhus_via_GitHub <noreply () php ! net>
Date: 2022-11-22 12:21:26
Message-ID: x27fKVi9JvV0AoJP02uISua9MsnGpvOnTl15sX6p8 () main ! php ! net
[Download RAW message or body]
Author: Tim Düsterhus (TimWolla)
Committer: GitHub (web-flow)
Pusher: TimWolla
Date: 2022-11-22T13:10:33+01:00
Commit: https://github.com/php/doc-en/commit/7453a50321f0834421cebea8edade14deef5466b
Raw diff: https://github.com/php/doc-en/commit/7453a50321f0834421cebea8edade14deef5466b.diff
random: Add description to extension constants (#2018)
* random: Add description to extension constants
* random: Improve explanation for the `MT_RAND_*` constants
Changed paths:
M reference/random/constants.xml
M reference/random/functions/mt-srand.xml
M reference/random/random/engine/mt19937/construct.xml
Diff:
diff --git a/reference/random/constants.xml b/reference/random/constants.xml
index 3c65c4db5b4..d53247d349a 100644
--- a/reference/random/constants.xml
+++ b/reference/random/constants.xml
@@ -11,6 +11,10 @@
</term>
<listitem>
<simpara>
+ Indicates that the correct <link \
xlink:href="&url.random.mersenne-twister;">Mt19937</link> (Mersenne Twister) + \
implementation will be used by the algorithm, when creating a \
<classname>Random\Engine\Mt19937</classname> instance + using \
<function>Random\Engine\Mt19937::__construct</function> or seeding the global \
Mersenne Twister + with <function>mt_srand</function>.
</simpara>
</listitem>
</varlistentry>
@@ -21,6 +25,13 @@
</term>
<listitem>
<simpara>
+ Indicates that an incorrect Mersenne Twister implementation will be used by \
the algorithm, when + creating a <classname>Random\Engine\Mt19937</classname> \
instance using <function>Random\Engine\Mt19937::__construct</function> + or \
seeding the global Mersenne Twister with <function>mt_srand</function>. + \
</simpara> + <simpara>
+ The incorrect implementation is available for backwards compatibility with
+ <function>mt_srand</function> prior to PHP 7.1.0.
</simpara>
</listitem>
</varlistentry>
diff --git a/reference/random/functions/mt-srand.xml \
b/reference/random/functions/mt-srand.xml index 470f575eb4d..2600af8f066 100644
--- a/reference/random/functions/mt-srand.xml
+++ b/reference/random/functions/mt-srand.xml
@@ -41,7 +41,7 @@
<simplelist>
<member>
<constant>MT_RAND_MT19937</constant>:
- The standardized Mt19937 implementation, available as of PHP 7.1.0.
+ The correct Mt19937 implementation, available as of PHP 7.1.0.
</member>
<member>
<constant>MT_RAND_PHP</constant>
diff --git a/reference/random/random/engine/mt19937/construct.xml \
b/reference/random/random/engine/mt19937/construct.xml index 115fe165942..8ab2e2309c3 \
100644
--- a/reference/random/random/engine/mt19937/construct.xml
+++ b/reference/random/random/engine/mt19937/construct.xml
@@ -46,7 +46,7 @@
<simplelist>
<member>
<constant>MT_RAND_MT19937</constant>:
- The standardized Mt19937 implementation.
+ The correct Mt19937 implementation.
</member>
<member>
<constant>MT_RAND_PHP</constant>:
--
PHP Documentation Commits Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic