Get the execution time of the page with PHP / * Get the execution time of a page and display it. Get_microtime () functions can be saved in public function files for each page call. * / function get_microtime () {list ($ usec, $ sec) = exPlode ("", microtime ()); return ((float) $ usec (float) $ sec);}?> / include 'include / function.php');
$ TIME_START = GET_MICROTIME (); Echo "Hello 1";?> for ($ I = 0; $ I <100000; $ I ) {Echo "$ I aa";}
?>
echo "Hello 2
"; $ TIME_END = Get_microtime (); $ TIME = $ TIME_END - $ TIME_START; Echo $ TIME;?> Seconds.