瑙f瀽PHP璁$畻椤甸潰鎵ц鏃堕棿鐨勫疄鐜颁唬鐮乢PHP鏁欑▼ | 甯涔嬪
程序员文章站
2022-04-21 13:50:12
...
濡備笅鎵€绀猴細
$t = new executeTime;
phpinfo();
class executeTime{
private $microtime;
public function __construct(){
$this->microtime = microtime(true);
}
public function getNow(){
$this->__dectruct();
}
public function __destruct(){
if (empty($_SERVER['REQUEST_TIME_FLOAT']))
echo '
澶嶅埗浠g爜 浠g爜濡備笅:
$t = new executeTime;
phpinfo();
class executeTime{
private $microtime;
public function __construct(){
$this->microtime = microtime(true);
}
public function getNow(){
$this->__dectruct();
}
public function __destruct(){
if (empty($_SERVER['REQUEST_TIME_FLOAT']))
echo '
鏈鎵ц鏃堕棿锛?, microtime(TRUE) - $this->microtime, '绉?lt;/div>';
else
echo '
else
echo '
鏈鎵ц鏃堕棿锛?, microtime(TRUE) - $_SERVER['REQUEST_TIME_FLOAT'], '绉?lt;/div>';
}
}
}
}
声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn核实处理。
相关文章
相关视频
上一篇: php时间戳与字符串的相互转换
下一篇: PHP工厂模式的好处