Skip to content

Instantly share code, notes, and snippets.

@arodu
Created March 1, 2021 12:36
Show Gist options
  • Save arodu/15d51cee013b09cb23c82e89256f7362 to your computer and use it in GitHub Desktop.
Save arodu/15d51cee013b09cb23c82e89256f7362 to your computer and use it in GitHub Desktop.
check execution time in PHP
<?php
function getTimeStart() {
return microtime(true);
}
function getExecutionTime($start = ''){
if (!empty($start)) {
$end = microtime(true);
return 'Execution: ' . number_format($end - $start,3) . ' milliseconds';
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment