Re: Random number generation...
| From: | Phillip Bow | Date: | Wed, 02 May 2001 15:56:20 +0000 |
| Subject: | Re: Random number generation... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-51163@lists.php.net to get a copy of this message | ||
Its supposedly faster and generates a "more" random number than rand() so I
don't see why not to use it.
--
phill
"Jon Haworth" <JHaworth@witanjardine.co.uk> wrote in message
news:67DF9B67CEFAD4119E4200D0B720FA3F13B733@BOOTROS...
> The manual also says:
> mt_rand -- Generate a better random value
>
> I've been using mt_rand() over rand() every time - is there any reason not
> to?
>
> Cheers
> Jon
>
>
> -----Original Message-----
> From: elias [mailto:elias_bachaalany@yahoo.com]
> Sent: 03 May 2001 00:05
> To: php-general@lists.php.net
> Subject: Re: [PHP] Random number generation...
>
>
> why not use the rand() ?
>
> manual says:
>
> rand -- Generate a random value
> Description
>
> int rand ([int min [, int max]])
>
>
> If called without the optional min, max arguments rand() returns a
> pseudo-random value between 0 and RAND_MAX. If you want a random number
> between 5 and 15 (inclusive), for example, use rand (5, 15).
>
> Remember to seed the random number generator before use with srand().
>
> -elias
> http://eassoft.cjb.net
>
>
> **********************************************************************
> 'The information included in this Email is of a confidential nature and is
> intended only for the addressee. If you are not the intended addressee,
> any disclosure, copying or distribution by you is prohibited and may be
> unlawful. Disclosure to any party other than the addressee, whether
> inadvertent or otherwise is not intended to waive privilege or
confidentiality'
>
> **********************************************************************
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>