Profiling PHP applications with PhpStorm

Posted on by Maarten Balliauw

That application we are building is way too slow. What gives? Did someone on our team commit code while partying? Are we making too many database calls? The only way to learn about the performance of our application code is to profile it. Something that’s fairly easy to do with PhpStorm!

Whether it’s a full web application, some library code or just a unit test, profiling allows us to gather program execution statistics. Information like the names of functions executed, the number of times a function has been executed, how long a function took to execute and such can give us a hint on where our code can be improved.

PhpStorm comes with support for two popular PHP profilers: Xdebug and Zend Debugger. Curious to see how this works? Head over the tutorial of your choice:

Give it a try and share your feedback through the issue tracker, the comments below or in our forums!

Develop with pleasure!
– JetBrains PhpStorm Team

Comments below can no longer be edited.

5 Responses to Profiling PHP applications with PhpStorm

  1. André says:

    January 24, 2014

    Is it wise to make a blog post about it while “Analyze Profiler Snapshot” is stillgiving wrong results?

    • Alex says:

      January 27, 2014

      I agree, I want to like it, but the data currently cannot be trusted at all. It fails to present correct data even on very simple programs right now.

  2. Jesse says:

    January 28, 2014

    The only problem with Xdebug is that it double-counts time spent inside a recursive function call, resulting in total times over 100%.

    Facebook’s XHProf works much better.


  3. Philippe says:

    January 28, 2014

    Would it be possible to upgrade included SVN client to support 1.8 working copy format?
    SVNKit 1.8.3 supports it 😉

    • Mikhail Vink says:

      January 29, 2014

      Yes, PhpStorm 7.1 & 7.1.1 already support SVN 1.8 via the native client.


Subscribe for updates