Get the App
SLTechnology News&Howtos  ›  Development  › 

How to use php to display program execution time

Shulou Source: shulou.com Published: 2022-06-03 07:18:11 11月15日 Update

Editor to share with you how to use php to display the execution time of the program, I believe that most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!

The code is as follows:

/ * *

* Program execution time

*

* @ return int Unit ms

, /

Function execute_time () {

$stime = explode ('', SYS_START_TIME)

$etime = explode ('', microtime ())

Return number_format (($etime [1] + $etime [0]-$stime [1]-$stime [0]), 6)

}

The above is all the contents of the article "how to use php to display the execution time of the program". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Tags: Time procedure article content not much code unit most more knowledge industry information information channel channel reference learning help Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno macOS Xiaomi Docker Huawei Shulou Tech Info