Answers for "php change execution time"

PHP
4

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';
Posted by: Guest on April-28-2020
2

php code to increase maximum execution time

ini_set('max_execution_time', '300'); //300 seconds = 5 minutes
ini_set('max_execution_time', '0'); // for infinite time of execution
Posted by: Guest on June-30-2020
0

max_execution_time php

ini_set ( 'max_execution_time', 1200); //1200 is time in secondss
Posted by: Guest on October-29-2020

Browse Popular Code Answers by Language