[英]When is mt_rand seeded?
在什么時候選擇mt_rand的種子? 根據一些 消息來源, php應該在每個新過程中重新播種此PRNG。 這在我的Windows機器上完美運行。 但是,在Linux機器上,每個請求都使用一個新種子。 我檢查了請求是否在同一進程中運行(使用getmypid ),並且它們確實在運行。 我想念什么嗎?
mt_rand
getmypid
我才找到答案。 從php7.1開始,不會保留mt_rand種子。 這是此更改的提交。
[英]How is PHP's mt_rand seeded?
[英]When will PHP generate the seed for mt_rand()
[英]Mt_rand returns 0
[英]PHP mt_rand() function
[英]mt_rand math numbers
[英]About mt_rand of an array
[英]is truncated mt_rand() safer?
[英]mt_rand max value
[英]PHP mt_rand not working
[英]Difference between mt_rand() and rand()
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.