PHP速学视频免费教程(入门到精通)
PHP怎么学习?PHP怎么入门?PHP在哪学?PHP怎么学才快?不用担心,这里为大家提供了PHP速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!
<?php /** * @功能:PHP计时器类 * @参数:null * @返回:string **/ function timer() { $timer = new timer(); $timer->start(); sleep(1); $timer->stop(); return $timer->show(); } class timer { var $time_start; var $time_end; function __construct() { $this->time_start = 0; $this->time_end = 0; } function timer() { $this->__construct(); } function start() { list($usec,$sec) = explode(" ",microtime()); $this->time_start = (float)$usec + (float)$sec; } function stop() { list($usec,$sec) = explode(" ",microtime()); $this->time_end = (float)$usec + (float)$sec; } function show($output = false) { $total = $this->time_end - $this->time_start; if($output) { echo $total," sec"; return true; } return $total." sec"; } } ?>
教程地址:
欢迎转载!但请带上文章地址^^
已抢7215个
抢已抢94862个
抢已抢14828个
抢已抢52097个
抢已抢194768个
抢已抢87281个
抢