分析 PHP 代码的工具
寻找一些 [免费软件/开源] 工具,以便轻松地在 win32 平台上分析大型 php 项目。需要找出哪部分代码最耗时。 很难手动为每个函数添加定时函数,循环......
Looking for some [freeware/opensource] tool in order to make it easy to profile a big php project on win32 platform. Need to find out which part of code is most time consuming.
It's hard to manually put timing function for each function, loop...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
您需要安装并配置Xdebug。它是事实上的标准 PHP 调试和分析工具。
WinCacheGrind 可以处理分析输出。这有点麻烦,但它可以完成工作。
You'll want to install and configure Xdebug. It's sort of the de-facto standard PHP debugging and profiling tool.
WinCacheGrind can crunch the profiling output. It's a bit buggy, but it does the job.
xdebug 工作得很好 http://xdebug.org
另外 wincachegrind 是一个查看分析器输出的好工具。 http://sourceforge.net/projects/wincachegrind/
以及(如果配置文件是小) webgrind http://code.google.com/p/webgrind/
xdebug works quite well http://xdebug.org
Also wincachegrind is a good tool for looking through the profiler's output. http://sourceforge.net/projects/wincachegrind/
As well as (if the profile file is small) webgrind http://code.google.com/p/webgrind/
除了优秀的xdebug(正如其他人提到的),你还可以看看xhprof。
In addition to the excellent xdebug (as mentioned by others), you can also look at xhprof.
是的,使用 XDebug,进入后,使用 此技术,适用于任何平台。
不要将其视为测量时间。
将其视为主要是试图询问:它在做什么,以及为什么这样做?
Yes, use XDebug, and once you're in it, use this technique, which works on any platform.
Don't think of it as measuring time.
Think of it as trying to ask, predominantly, What is it doing, and Why is it doing it?