php执行时间

php 打印执行请求的时间
```开始时间

$starttime = explode(' ',microtime());
查询的代码
$a = apiP('http://www.leagueimg.com/Thumb/webshop/L3NwYWNlL3VwbG9hZHMvc3VuL3ltcV9ob21lX3N1bi8yMDIwLTA3LTMwLzVmMjJhODdiNDAyNjMucG5nQDEwMEAxMDA=.gif',200,200);
```结束时间
$endtime = explode(' ',microtime());
计算时间方法
$thistime = $endtime[0]+$endtime[1]-($starttime[0]+$starttime[1]);
$thistime = round($thistime,3);
echo "本网页执行耗时:".$thistime." 秒。".time();

打印结果: 本网页执行耗时:0.05 秒。
能够很快速获取执行某个接口的请求时间
原文地址:https://www.cnblogs.com/kevin-yang123/p/13407818.html