首頁  >  文章  >  php教程  >  php啊实打实的

php啊实打实的

PHP中文网
PHP中文网原創
2016-05-23 08:39:171177瀏覽

[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);

                   

                   

陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn