Source Code:
(back to article)
<?php // Starting clock time in seconds $start_time = microtime(true); $a = 1; // Start loop for ($i = 1; $i <= 10000000; $i++) { $a++; } // End clock time in seconds $end_time = microtime(true); // Calculating the script execution time $execution_time = $end_time - $start_time; echo " Execution time of script = " . $execution_time . " sec"; ?>
Result:
Report an issue