Home >Backend Development >PHP Tutorial >PHP calculates web page execution time

PHP calculates web page execution time

WBOY
WBOYOriginal
2016-07-25 08:45:35899browse

microtime(): Get millisecond-level UNIX timestamp

  1. $t=microtime();
  2. /*
  3. The code you want to execute
  4. */
  5. echo "Oh la la la la la La la";
  6. $t=microtime()-$t;
  7. echo "
    This code execution took $t milliseconds.";
  8. ?>
Copy code

Execution time, php


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn