Home  >  Article  >  Backend Development  >  PHP implements web page execution timing function

PHP implements web page execution timing function

WBOY
WBOYOriginal
2016-08-08 09:30:491462browse

microtime(): Get millisecond-level UNIX timestamp

<?php
$t=microtime();
/*
你要执行的代码
*/
echo "哦啦啦啦啦啦啦啦";
$t=microtime()-$t;
echo "<br>本次代码执行用了$t毫秒.";
?>

The above introduces the implementation of web page execution timing function in PHP, including aspects of content. I hope it will be helpful to friends who are interested in PHP tutorials.

Statement:
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