Last active
August 7, 2019 13:19
-
-
Save zecka/38d7b0a945de159ac565d9321b95687f to your computer and use it in GitHub Desktop.
measure execution times of php scripts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function example_measure_execution_time(){ | |
$start = microtime(true); | |
// Here your script | |
$duration = microtime(true) - $start; // in seconds | |
echo 'the script take '. $duration.' to be executed'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment