Skip to content

Instantly share code, notes, and snippets.

@maheshwaghmare
Created August 18, 2017 06:52
Show Gist options
  • Save maheshwaghmare/01bc6bb8af67cf8ea8668aff60716bf0 to your computer and use it in GitHub Desktop.
Save maheshwaghmare/01bc6bb8af67cf8ea8668aff60716bf0 to your computer and use it in GitHub Desktop.
PHP Calculate Function Execution Time.
<?php
// Start time.
$time_start = microtime(true);
// Execute your logic here.
// End time.
$time_end = microtime(true);
// Calculate execution time.
$time = $time_end - $time_start;
// echo '<pre> Execution time : '.$time.' seconds . </pre>';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment