function microtime_float()
{
     list($usec, $sec) = explode(" ", microtime());
     return ((float)$usec + (float)$sec);
}

$time_start = microtime_float();

// Sleep for a while
//usleep(100);

for($i=0;$i<100000;$i++){
	$arr[$i] = $i;
}
$cc = sizeof($arr);

$time_end = microtime_float();
$time = $time_end - $time_start;

echo '<br/>'.$cc . "<br/>Did nothing in $time seconds<br/><br/>";
最后修改日期: 2021-04-23

留言

撰写回覆或留言

发布留言必须填写的电子邮件地址不会公开。