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

PHP calculates web page execution time

WBOY
Release: 2016-07-25 08:45:35
Original
892 people have browsed it

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


Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template