Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php time a script

//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';
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #php #time #script
ADD COMMENT
Topic
Name
4+7 =