Answers for "php check execution time and kill"

PHP
0

php check how much time each instruction takes to complete

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

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

php set time counters inside code meassure

<?php
//No need for microtime at the start of script.

// Use this at the end of your script, or around in the 
// code where you need to take meassures.
$time = microtime(true) - $_SERVER["REQUEST_TIME_FLOAT"];

echo "Did stuff in $time seconds\n";
?>
Posted by: Guest on December-27-2020

Browse Popular Code Answers by Language