相关疑难解决方法(0)

分析PHP脚本的最简单方法

分析PHP脚本最简单的方法是什么?

我喜欢在上面添加一些内容,这些内容显示了所有函数调用的转储以及它们花了多长时间,但我也可以将特定函数放在一边.

我尝试过使用microtime函数:

$then = microtime();
myFunc();
$now = microtime();

echo sprintf("Elapsed:  %f", $now-$then);
Run Code Online (Sandbox Code Playgroud)

但这有时会给我带来负面结果.另外,在我的代码中撒上这些东西会很麻烦.

php profiling

284
推荐指数
12
解决办法
18万
查看次数

标签 统计

php ×1

profiling ×1