php教程|php手册
nbsp,quot,gt,points,function
php教程-php手册
夹娃娃5级佣金源码,Ubuntu使用什么gui,python酷狗爬虫,select php取值,seO174lzw
google|脚本|统计|执行
微赞论坛 源码,ubuntu引导界面图片,邯郸卖爬虫的,php显示headers,仁怀seo托管lzw
<?php// class PHP_timer开始
class PHP_timer {
商业源码全套,在ubuntu修改文件,tomcat删除后怎么办,c++网络爬虫,php项目经验怎么说,seo网站密度lzw
// 用来收集脚本执行过程中的信息
var $points = array();
// 在脚本的开始处调用这个函数
function start() {
// 请看后面的addmarker函数
$this->addmarker(“Start”);
}
// end function start()
// 在脚本的结束处调用这个函数
function stop() {
// 请看后面的addmarker函数
$this->addmarker(“Stop”);
}
// end function stop()
// 这个函数用来在脚本执行时增加一个标记
// 需要一个用来描述的名字
function addmarker($name) {
// 调用 jointime() 函数并将microtime() 的返回值传递过去
$markertime = $this->jointime(microtime());
// $ae 得到当前数组的大小,也就是当前的插入位置
// currently in the $points array
$ae = count($this->points);
// 在数组中存储timestamp 和说明
$this->points[$ae][0] = $markertime;
$this->points[$ae][1] = $name;
}
// end function addmarker()
// 这个函数会处理从microtime() 返回的字串
function jointime($mtime) {
// 分解字串
$timeparts = explode(” “,$mtime);
// 连接两个字串,并去除小数部分的0
$finaltime = $timeparts[1].substr($timeparts[0],1);
// 返回连接后的字串
return $finaltime;
}
// end function jointime()
// 这个函数简单的显示从开始到结束所需要的时间
function showtime() {
echo bcsub($this->points[count($this->points)-1][0],$this->points[0][0],6);
}
// end function showtime()
// 这个函数显示所有的在脚本运行过程中收集到的信息
function debug() {
echo “Script execution debug information:”;
echo “
“;
}
// end function debug()
}
// end class PHP_timer
?>