File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -31,6 +31,16 @@ highly discouraged.</simpara></warning>'>
3131 </para >
3232</caution >'>
3333
34+ <!ENTITY caution.subtle-global-state '<caution xmlns =" http://docbook.org/ns/docbook" >
35+ <simpara >
36+ This function shares a global state with other functions.
37+ These functions can alter each other's outputs, regardless of scope.
38+ </simpara >
39+ <simpara >
40+ Prefer using <classname >Random\Randomizer</classname > methods in all newly written code.
41+ </simpara >
42+ </caution >'>
43+
3444<!ENTITY caution.mt19937-tiny-seed '<caution xmlns =" http://docbook.org/ns/docbook" >
3545 <para >
3646 Because the Mt19937 (“Mersenne Twister”) engine accepts only a single 32 bit integer as the
Original file line number Diff line number Diff line change 1717 key (or keys) of the random entries.
1818 </para >
1919 &caution.cryptographically-insecure;
20+ &caution.subtle-global-state;
2021 </refsect1 >
2122 <refsect1 role =" parameters" >
2223 &reftitle.parameters;
Original file line number Diff line number Diff line change 1515 This function shuffles (randomizes the order of the elements in) an array.
1616 </para >
1717 &caution.cryptographically-insecure;
18+ &caution.subtle-global-state;
1819 </refsect1 >
1920 <refsect1 role =" parameters" >
2021 &reftitle.parameters;
Original file line number Diff line number Diff line change 3535 15)</literal >.
3636 </simpara >
3737 &caution.cryptographically-insecure;
38+ &caution.subtle-global-state;
3839 </refsect1 >
3940 <refsect1 role =" parameters" >
4041 &reftitle.parameters;
Original file line number Diff line number Diff line change 2020
2121 ¬e.randomseed;
2222 &caution.mt19937-tiny-seed;
23+ &caution.subtle-global-state;
2324
2425 </refsect1 >
2526 <refsect1 role =" parameters" >
Original file line number Diff line number Diff line change 2525 15)</literal >.
2626 </simpara >
2727 &caution.cryptographically-insecure;
28+ &caution.subtle-global-state;
2829 <note >
2930 <simpara >
3031 Prior to PHP 7.1.0, <function >getrandmax</function > was only 32767 on some
Original file line number Diff line number Diff line change 2020
2121 ¬e.randomseed;
2222 &caution.mt19937-tiny-seed;
23+ &caution.subtle-global-state;
2324 <note ><simpara >As of PHP 7.1.0, <function >srand</function > has been made
2425 an alias of <function >mt_srand</function >.</simpara >
2526 </note >
Original file line number Diff line number Diff line change 1717 of all possible is created.
1818 </simpara >
1919 &caution.cryptographically-insecure;
20+ &caution.subtle-global-state;
2021 </refsect1 >
2122
2223 <refsect1 role =" parameters" >
You can’t perform that action at this time.
0 commit comments