php set time counters inside code meassure

Solutions on MaxInterview for php set time counters inside code meassure by the best coders in the world

showing results for - "php set time counters inside code meassure"
Hugo
14 Feb 2020
1$start = microtime(true);
2while (...) {
3
4}
5$time_elapsed_secs = microtime(true) - $start;
Yannick
17 Oct 2019
1<?php
2//No need for microtime at the start of script.
3
4// Use this at the end of your script, or around in the 
5// code where you need to take meassures.
6$time = microtime(true) - $_SERVER["REQUEST_TIME_FLOAT"];
7
8echo "Did stuff in $time seconds\n";
9?>
10