Skip to content

Instantly share code, notes, and snippets.

@mehrshaddarzi
Created April 6, 2024 08:47
Show Gist options
  • Save mehrshaddarzi/71d83064a18f5edaa1190aa45e4d3637 to your computer and use it in GitHub Desktop.
Save mehrshaddarzi/71d83064a18f5edaa1190aa45e4d3637 to your computer and use it in GitHub Desktop.
Get Period Execute Run Time Script PHP (microtime)
// place this before any script you want to calculate time
$time_start = microtime(true);
// Check Time Spend
$time_end = microtime(true);
$execution_time = ($time_end - $time_start);
// Echo Date
echo date("H:i:s",$endtime-$starttime);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment