That was wrong, Michael used version 3.0.6 and not 3.0.7.

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@18776 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Egon Schmid 2000-01-20 16:50:07 +00:00
parent 619ce87ad8
commit 8a2b3e5180

View file

@ -534,7 +534,7 @@ $binary = base_convert($hexadecimal, 16, 2);
<parameter><optional>int min</optional></parameter>
</paramdef>
<paramdef>
<parameter><optional>int range</optional></parameter>
<parameter><optional>int max</optional></parameter>
</paramdef>
</funcsynopsis>
<simpara>
@ -552,22 +552,30 @@ $binary = base_convert($hexadecimal, 16, 2);
url="&url.mersenne.twister;">&url.mersenne.twister;</ulink>.
</simpara>
<simpara>
If called without the optional min, range arguments
<function>mt_rand</function> returns a pseudo-random value
between 0 and <constant>RAND_MAX</constant>. If you want a
random number between 5 and 15 (inclusive), for example, use
mt_rand (5, 11).
If called without the optional <parameter>min</parameter>,
<parameter>max</parameter> arguments <function>mt_rand</function>
returns a pseudo-random value between 0 and
<constant>RAND_MAX</constant>. If you want a random number
between 5 and 15 (inclusive), for example, use <literal>mt_rand
(5, 15)</literal>.
</simpara>
<simpara>
Remember to seed the random number generator before use with
<function>mt_srand</function>.
</simpara>
<note>
<para>
In versions before 3.0.7 the meaning of
<parameter>max</parameter> was <parameter>range</parameter>. To
get the same results in these versions the short example should
be <literal>mt_rand (5, 11)</literal> to get a random number
between 5 und 15.
</para>
</note>
<simpara>
See also <function>mt_srand</function>,
<function>mt_getrandmax</function>,
<function>srand</function>,
<function>rand</function> and
<function>getrandmax</function>.
<function>mt_getrandmax</function>, <function>srand</function>,
<function>rand</function> and <function>getrandmax</function>.
</simpara>
</refsect1>
</refentry>
@ -750,22 +758,33 @@ $randval = mt_rand();
<parameter><optional>int min</optional></parameter>
</paramdef>
<paramdef>
<parameter><optional>int range</optional></parameter>
<parameter><optional>int max</optional></parameter>
</paramdef>
</funcsynopsis>
<simpara>
If called without the optional min,max arguments
<function>rand</function> returns a pseudo-random value between 0
and <constant>RAND_MAX</constant>. If you want a random number
between 5 and 15 (inclusive), for example, use rand(5,11).
If called without the optional <parameter>min</parameter>,
<parameter>max</parameter> arguments <function>rand</function>
returns a pseudo-random value between 0 and
<constant>RAND_MAX</constant>. If you want a random number
between 5 and 15 (inclusive), for example, use <literal>rand (5,
15)</literal>.
</simpara>
<simpara>
Remember to seed the random number generator before use with
<function>srand</function>.</simpara>
<function>srand</function>.
</simpara>
<note>
<para>
In versions before 3.0.7 the meaning of
<parameter>max</parameter> was <parameter>range</parameter>. To
get the same results in these versions the short example should
be <literal>rand (5, 11)</literal> to get a random number
between 5 und 15.
</para>
</note>
<simpara>
See also <function>srand</function>,
<function>getrandmax</function>,
<function>mt_rand</function>,
<function>getrandmax</function>, <function>mt_rand</function>,
<function>mt_srand</function> and
<function>mt_getrandmax</function>.
</simpara>