How to find php execution time? [duplicate]
问题 This question already has answers here : Tracking the script execution time in PHP (19 answers) Closed 7 years ago . I have a large PHP code in my website, I want to know the execution time of processing. How can I do this? <?php // large code // large code // large code // print execution time here ?> 回答1: You can use microtime as the start and end of your PHP code: <?php $time_start = microtime(true); sleep(1); $time_end = microtime(true); $time = $time_end - $time_start; echo "Process Time