跌落尘层的王者
2014-10-19 14:12
<?php
header('Content-type: text/html; charset=utf8');
$start = current_time();
$i = 0;
$arr = range(1, 200000);
while ($i < 200000) {
++$i;
isset($arr[$i]);
//array_key_exists($i , $arr);
}
$end = current_time();
echo "Lost Time: ". number_format($end - $start,3)*1000;
echo "\n";
function current_time(){
echo microtime();
list( $usec ,$sec) = explode(" ", microtime());
echo "|";
echo $usec;
echo $sec;
return ((float)$usec + (float)$sec);
}
?>还没有人回答问题,可以看看其他问题
性能优化之PHP优化
37099 学习 · 109 问题
相似问题