您的位置:首页 > 编程语言 > PHP开发

php代码效率测试

2012-06-14 14:50 190 查看
PHP代码

$GLOBALS['_start_time_'] = array_sum(explode(' ', microtime()));    

/**   

* 调试使用情况   

*/   

function debug_using()    

{    

echo '执行时间:'.(array_sum(explode(' ', microtime()))-$GLOBALS['_start_time_']).' 秒.<br>';    

if (function_exists('memory_get_usage')) {    

echo '内存使用:'.number_format(memory_get_usage()).' 字节.<br>';    

}    

}   

 

 

PHP代码

debug_using();  
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  php function 测试