Home > php教程 > php手册 > php学习之计算程序运行的时间

php学习之计算程序运行的时间

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-13 11:37:01
Original
879 people have browsed it

php学习之计算程序运行的时间


function gettime(){
$starttime=microtime(true); //获取程序开始执行的时间
mt_rand(1,10); //你执行的代码 liehuo。net
$endtime=microtime(true);//获取程序执行结束的时间
$total=$endtime-$starttime; //计算差值
return $total;
}
echo gettime();
?>

原文地址:http://www.52blogger.com/archives/5

Related labels:
Statement of this Website
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
Latest Issues
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template