计算php函数的执行时间

2015-01-24 0 664
计算php函数的执行时间
<?php
$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 计算php函数的执行时间 http://www.ox520.com/7338.html

常见问题

相关文章

发表评论
暂无评论
官方客服团队

为您解决烦忧 - 24小时在线 专业服务