max_execution_time php
snippet in php

php time a script

user3633

//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.' Seconds';

max_execution_time php

user8930

ini_set ( 'max_execution_time', 1200); //1200 is time in secondss

ini_set('max_execution_time' 0) in php

user3969

ini_set('max_execution_time', 0);