To check how match time code execution takes you need to frame checking code with following instructions:
1 2 3 4 5 6 7 |
<?php $StartTime = microtime(true); // Checking code sleep(rand(5,10)); // End of checking code echo "Executed for: ".(microtime(true)-$StartTime)." sek."; ?> |
This example result:
Executed for: 8.9997079372406 sek.