Home  >  Article  >  php教程  >  php啊实打实的

php啊实打实的

PHP中文网
PHP中文网Original
2016-05-23 08:39:171138browse

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

                   

                   

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:PHP定时执行计划任务Next article:新闻分页下标生成