php啊实打实的
程序员文章站
2022-05-17 18:27:05
...
[PHP]代码
function singelRand($result){ $chars="1234567890"; $string=""; for($i=0;$i<8;$i++){ srand((double)microtime()*1000000); $rand=rand(0,strlen($chars)-1); $string.=substr($chars,$rand,1); } if(!<a href="https://www.baidu.com/s?wd=in_array&tn=44039180_cpr&fenlei=mv6quAkxTZn0IZRqIHckPjm4nH00T1Y4rjnsuAckmW6Lmhm4rj630ZwV5Hcvrjm3rH6sPfKWUMw85HfYnjn4nH6sgvPsT6KdThsqpZwYTjCEQLGCpyw9Uz4Bmy-bIi4WUvYETgN-TLwGUv3EnHTLnWnsrHf4nWmvrHc4n1cY" target="_blank" class="baidu-highlight">in_array</a>($string, $result)){ return $string; } } function produce50W(){ $count = 50000; $result = array(); for($i=0;$i<$count;$i++){ $callback = singelRand(); if($a!=NULL){ <a href="https://www.baidu.com/s?wd=array_push&tn=44039180_cpr&fenlei=mv6quAkxTZn0IZRqIHckPjm4nH00T1Y4rjnsuAckmW6Lmhm4rj630ZwV5Hcvrjm3rH6sPfKWUMw85HfYnjn4nH6sgvPsT6KdThsqpZwYTjCEQLGCpyw9Uz4Bmy-bIi4WUvYETgN-TLwGUv3EnHTLnWnsrHf4nWmvrHc4n1cY" target="_blank" class="baidu-highlight">array_push</a>($result, $callback); } } return $result; } $a = produce50W(); <a href="https://www.baidu.com/s?wd=print_r&tn=44039180_cpr&fenlei=mv6quAkxTZn0IZRqIHckPjm4nH00T1Y4rjnsuAckmW6Lmhm4rj630ZwV5Hcvrjm3rH6sPfKWUMw85HfYnjn4nH6sgvPsT6KdThsqpZwYTjCEQLGCpyw9Uz4Bmy-bIi4WUvYETgN-TLwGUv3EnHTLnWnsrHf4nWmvrHc4n1cY" target="_blank" class="baidu-highlight">print_r</a>($a);
上一篇: 邮件发送问题