作者ottokang (猫猫的大玩偶)
看板PHP
标题Re: [请益] rand问题
时间Fri Feb 9 21:59:53 2007
※ 引述《satire (夫复何求..)》之铭言:
引言恕删
根据PHP手册上面的说明:
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.
PHP 4.2.0版之後就不用呼叫srand()函数,因为rand()的时候会自动帮你做这个动作
另外PHP手册也推荐使用mt_rand(),产生乱数的效果比较好
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 222.157.113.76