速度测试 php4.4.2 php5.0.5 php5.1.2 解析程序速度 发完睡觉
uuq 2006-02-02 02:36:35 在网上看了mysql5.0.X和mysql4.0.X性能文章后
也在网上看了php4 php5速度文章
决定自已也试下
程序来自网上
测试一
<?php
function microtime_float(){
list($usec, $sec) = explode(" ", microtime());
return ((float)$usec + (float)$sec);
}
class test {
function example(){
return 1;
}
}
$time_start = microtime_float();
for($i=1;$i<=1000000;$i++) {
$testclass=new test();
$testclass->example();
}
$end_start = microtime_float();
echo $end_start-$time_start;
?>