Created
February 7, 2016 20:22
-
-
Save fgilio/73f4babf2957ad33f3b2 to your computer and use it in GitHub Desktop.
PHP - Use microtime to benchmark scripts
This file contains hidden or 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 | |
$time_start = microtime(true); | |
// Run code here | |
$time_end = microtime(true); | |
$time = $time_end - $time_start; | |
echo '<br> <h1> Time = '.$time.' seconds. </h1> <br>'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment