You are here: Re: rand() and mt_rand() « All PHP « IT news, forums, messages
Re: rand() and mt_rand()

Posted by Oli Filth on 10/03/05 16:16

Iain wrote:
> Oh no, I lie...actually checking on the hosted site with a phpinfo() vs
> believing what the ISP say, I see the hosted service is on v4.1.2
>
>

According to the manual (http://php.net/rand):

"As of PHP 4.2.0, there is no need to seed the random number generator
with srand() or mt_srand() as this is now done automatically."

i.e. before 4.2, you will need to call srand() at the beginning of the
script to seed the random number generator.

--
Oli

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация