Created
December 15, 2015 14:30
-
-
Save habibun/ef0a17d7b8fd53f4c648 to your computer and use it in GitHub Desktop.
check script execution time
This file contains 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 | |
// Start timing | |
$startTime = microtime( true ); | |
// Perform the operation | |
for ( $i=0; $i<10; $i++ ) { | |
echo "<p>Hello, world!</p>"; | |
} | |
// Stop timing | |
$endTime = microtime( true ); | |
$elapsedTime = $endTime - $startTime; | |
printf( "<p>The operation took %0.6f seconds to execute.</p>", $elapsedTime ); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment