计算php函数的执行时间

php教程评论544 views阅读模式
  1. $long_str = "this is a test to see how much time md5 function takes to execute over this string";
  2. // start timing from here
  3. $start = microtime(true);
  4. // function to test
  5. $md5 = md5($long_str);
  6. $elapsed = microtime(true) - $start;

复制代码

企鹅博客
  • 本文由 发表于 2019年9月30日 18:51:59
  • 转载请务必保留本文链接:https://www.qieseo.com/315663.html

发表评论