测试php代码的运行时间
测试php代码的运行时间
<?php class TestTime{ private $stime; private $etime; public function __construct(){ $this->stime = microtime(true); } public function start(){ $this->stime = microtime(true); } public function end(){ $this->etime = microtime(true); echo round(($this->etime - $this->stime) * 1000,5).'毫秒'; $this->start(); } } ?>