Skip to content

Commit 37cf0c5

Browse files
authored
Update srand.xml Fix incorrect description (php#4871)
* Update srand.xml Fix incorrect description `srand(0)` uses `0` as seed, random seeding only occurs when seed is `null` or omitted. * Update srand.xml Sync the description with mt_srand()
1 parent e325776 commit 37cf0c5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

reference/random/functions/srand.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@
1313
<methodparam choice="opt"><type>int</type><parameter>mode</parameter><initializer><constant>MT_RAND_MT19937</constant></initializer></methodparam>
1414
</methodsynopsis>
1515
<para>
16-
Seeds the random number generator with <parameter>seed</parameter>
17-
or with a random value if <parameter>seed</parameter> is <literal>0</literal>.
16+
Seeds the random number generator with
17+
<parameter>seed</parameter> or with a random value
18+
if no <parameter>seed</parameter> is given.
1819
</para>
1920

2021
&note.randomseed;

0 commit comments

Comments
 (0)