计算php函数的执行时间
时间:2021-07-01 10:21:17
帮助过:22人阅读
- $long_str = "this is a test to see how much time md5 function takes to execute over this string";
- // start timing from here
- $start = microtime(true);
- // function to test
- $md5 = md5($long_str);
- $elapsed = microtime(true) - $start;
- echo "That took $elapsed seconds.\n";
- ?>
|
执行时间, php