Skip to content

Instantly share code, notes, and snippets.

@zecka
Last active August 7, 2019 13:19
Show Gist options
  • Save zecka/38d7b0a945de159ac565d9321b95687f to your computer and use it in GitHub Desktop.
Save zecka/38d7b0a945de159ac565d9321b95687f to your computer and use it in GitHub Desktop.
measure execution times of php scripts
<?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