1//place this before any script you want to calculate time
2$time_start = microtime(true);
3
4//sample script
5for($i=0; $i<1000; $i++){
6 //do anything
7}
8
9$time_end = microtime(true);
10$execution_time = ($time_end - $time_start);
11echo '<b>Total Execution Time:</b> '.($execution_time*1000).'Milliseconds';
12