最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
php中microtime函数记录代码执行时间
时间:2022-06-24 20:03:33 编辑:袖梨 来源:一聚教程网
| 代码如下 | 复制代码 |
| $t1 = microtime(true); // ... 执行代码 ... $t2 = microtime(true); echo '耗时'.round($t2-$t1,3).'秒'; |
|
microtime用法
microtime() 函数返回当前 Unix 时间戳和微秒数。
语法
microtime(get_as_float)参数 描述
get_as_float 如果给出了 get_as_float 参数并且其值等价于 TRUE,该函数将返回一个浮点数。