Answers for "find the execution time of a php script"

PHP
4

how to check query execution time in php

//place this before any script you want to calculate time
$time_start = microtime(true); 

//sample script
for($i=0; $i<1000; $i++){
 //do anything
}

$time_end = microtime(true);
$execution_time = ($time_end - $time_start);
echo '<b>Total Execution Time:</b> '.($execution_time*1000).'Milliseconds';
Posted by: Guest on April-28-2020
1

measure php execution time

$start = microtime(true);
while (...) {

}
$time_elapsed_secs = microtime(true) - $start;
Posted by: Guest on May-13-2020

Code answers related to "find the execution time of a php script"

Browse Popular Code Answers by Language