PHP calculates the page execution time. After you write a script to calculate the execution time of the page, the execution time is displayed in the upper-right corner of the page. the advantage is that you can execute the code snippet at the beginning (1) [code] [PHP] The code itself writes a script for calculating the page execution time
The execution time is displayed in the upper right corner of the page.
The advantage is that you can execute the code snippet at the beginning.
(1) [Code][PHP] code
01 02$t = new executeTime;03 04phpinfo();05 06class executeTime{07 private $microtime;08 public function __construct(){09 $this->microtime = microtime(true);10 }11 12 public function getNow(){13 $this->__dectruct();14 }15 16 public function __destruct(){17 if (empty($_SERVER['REQUEST_TIME_FLOAT']))18 echo '
Execution time :', microtime(TRUE) - $this->microtime, 'Second
' ; 19 else 20 echo '
Execution time :', microtime(TRUE) - $_SERVER['REQUEST_TIME_FLOAT'], 'Second
' ; 21 } 22 }
The pipeline execution time is displayed in the upper-right corner of the page. the advantage is that you can execute the code snippet at the beginning (1) [code] [PHP] code...