Menu Search
Jump to the content X X
Smashing Conf New York

We use ad-blockers as well, you know. We gotta keep those servers running though. Did you know that we publish useful books and run friendly conferences — crafted for pros like yourself? E.g. upcoming SmashingConf Barcelona, dedicated to smart front-end techniques and design patterns.

The Big PHP IDE Test: Why Use One And Which To Choose

Everyone wants to be more productive, make fewer mistakes and write good code. Of course, that all depends on you, but in most cases integrated development environments (IDEs) can help you achieve those goals more easily. Unfortunately, choosing the right IDE is very difficult because a lot needs to be considered. And the website of almost every IDE tells us it is the best one1.

In this post, we’ll take a close look at the most popular PHP IDEs, exploring their functions, comparing them in a table and drawing some conclusions. Hopefully, you’ll get an idea of what each PHP IDE has to offer and which one best fits your needs.

I am the best!

For a long time, I worked in PHP only for fun. I’ve developed Java Web applications with Eclipse and IntelliJ IDEA. These are a great Java IDEs. Not surprisingly, I wanted something similar for PHP. The following are some of the features that I found needed to be considered.

IDE Features Link

1. Syntax highlighting Link

Good syntax highlighting improves code readability a lot. Really! Just look at this:

Syntax highlighting

2. Code completion Link

Automatic code suggestions can help the developer avoid having to type so much. If it supports custom classes and phpDoc2, it can even save you from having to read project documentation.

Good code completion can also prevent typos. For example, if typing $cotroller-> does not show you any suggestions, you’ll know something is wrong. Uh oh… it should be $controller!

Poor code completion can slow you down if too many variants are shown or your class methods are not picked up.

Code completion

It is also good to have file name completion in HTML src=" and PHP include and require.

3. Navigation Link

One of the most boring things is trying to find where a certain variable has been defined or used. Some good IDEs can help with “GoTo” actions, like go to definition.

Another important feature is search. Searching should not take a long time, even with large projects. Even better is if the IDE lets you move quickly to the next occurrence of a search phrase, like Firefox does with its Quick Find feature.

Code navigation

4. Errors and warnings highlighting Link

On-the-fly syntax checking can prevent various typos and common programming mistakes. In the example below, the IDE indicates that you may have used = instead of ==:

Warning and errors

The more the IDE detects, the better — except false positives, of course.

5. Refactoring and code generation Link

Refactoring is basically a set of techniques for turning weak code into solid code. Its implementation in PHP IDEs is very weak compared to that of compiled-language IDEs, such as Java and C, but it’s still very useful.

Very basic PHP refactoring includes:

  • “Move,” which updates all includes and requires when moving a file to another directory.
  • “Rename,” which renames something and ensures it is renamed throughout the project.
  • “Safe delete,” which ensures deletion of a file does not harm other parts of the project.

Refactoring

In addition to basic refactoring, some IDEs can generate code for class constructors, getters/setters and even stub methods for a parent class.

Code generation

6. Debugging Link

Debugging is not so critical in PHP because you can add echos or use something like FirePHP without even having to recompile your code. But for complex applications in which you need to add echo after each line to see what’s going on, debugging can save you hours.

Debugger

If the IDE is good enough, it provides you with step-by-step debugging and lets you see the current values of variables in scope.

7. Versioning system Link

Versioning is extremely useful for both team and one-person development. It shows what changes have been made to a file, when they were made and by whom. A good IDE allows you to visually compare revisions, copy changes from one version to another, revert to previous states and merge changes made by different team members.

Visual diff

When performing common checks and commits, integrating a versioning system such as CVS, SVN, git or Mercurial in your IDE is usually much better than running a separate application.

8. Client-side features Link

Using PHP alone is very rare. CSS and JavaScript are almost always somewhere in your application. So, good code completion, highlighting, navigation and perhaps some refactoring would be just as beneficial for the other languages and technologies you use in conjunction with PHP.

HTML code completion

How To Choose A Good One? Link

Every IDE provides a lot of features. Some of those features are very useful, some are not. Here are some guidelines to follow to narrow down the one for you:

  • Try free ones first. Their feature set may be enough for you, and you wouldn’t need to pay for a license.
  • First, make sure the features you want are ones you really need. If they are, check that they work properly in your IDE of choice.
  • If you find one IDE that fits well but is missing one or two features, try specialized tools.
  • Once you choose an IDE, play with it for a week before implementing it in a big project. You may find your current working habits are too strong to allow you to feel comfortable with it.

A Comparison Table Link

The great IDE filter

Along with Vladimir Statsenko3, who helped with the section on Aptana, I’ve prepared this comparison table4.

What Was Covered Link

Eclipse-based IDEs
PDT, Zend Studio 6, Aptana PHP and Aptana Studio Pro are built on the Eclipse platform. That means you can use any of the thousands of Eclipse plug-ins out there. If a feature you need is not integrated in the IDE itself, it is most likely available as a third party plug-in.

Eclipse PHP IDEs were the first freeware IDEs with true IDE capabilities, such as complex code completion, code navigation, projects support, etc. Most of them are still free and very powerful.

NetBeans
NetBeans is the new bright kid on the block, but not built on the Eclipse platform. It has most of the features of other IDEs and yet more still. And it’s free, too.

Development of this IDE is very public, open and rapid. Following the development blog and testing new builds as they come out is very interesting, even if there is already a stable version available (v6.5).

What Was Not Covered Link

There are plenty of powerful notepads such as PSPad, Notepad++, TextMate, vim and Emacs. Some are very similar to IDEs and even better if you want a good text editor but not the full IDE experience. Reviewing all of the good IDEs out there would not be possible (there are so many), so only the major players are compared here.

PHP IDEs We Tested Link

Here is the list of PHP IDEs we included in our review:

  • PDT 1
  • PDT 2.0
  • Zend Studio 6
  • NetBeans 6.5
  • NetBeans 7 (development version)
  • Aptana PHP
  • Aptana Studio Pro
  • Codelobster *
  • Nusphere PhpED 5.6 *

We thought it would be interesting to allow our readers to edit the table, which is hosted on Google Docs. Feel free to add your favorite IDE if it’s not there, or note some features on the ones that are.

Comparison table5

The full table at Google Docs6 (not editable snapshot7)

* Codelobster and Nusphere PhpED were filled in by Russian community members.

Conclusion Link

Still not using IDE? You may be wasting time. Try it. You’ll see the difference.

Both PDT and NetBeans are good. If you need a lot of plug-ins, Eclipse is the better choice. If editing tools and code completion are more important to you, then pick NetBeans. NetBeans is a bit more responsive, too.

If you are mostly editing HTML and CSS, try Notepad++, vim, TextMate or Emacs. They all have very good HTML editing capabilities and can be configured for simple code completion. And they are faster and lighter than fully featured IDEs.

If you are editing complex JavaScript, try Aptana, which is amazing for JavaScript, or the Spket plug-in8 for Eclipse, which has nearly the same features.

And remember, IDEs are not meant to change the way you think. They simply speed up the development process.

Commercial vs. Freeware Link

Strange as it may sound, commercial PHP IDEs such as Zend Studio and Aptana Studio Pro do not have significantly more advantages than free alternatives such as PDT2.0 and NetBeans, both of which are very good.

With Aptana Studio Pro, you get a good IE JavaScript debugger, SFTP, FTPS and some other less-than-useful features for $99.

Like NetBeans, Zend Studio offers a bit more code completion and error detection than PDT. It also has a very good customizable code formatter, refactoring capabilities (which NetBeans also has) and some wizards for the Zend Framework. It starts at $399.

Resources Link

(al)

Footnotes Link

  1. 1 http://www.zend.com/en/products/studio/compare
  2. 2 http://www.phpdoc.org/
  3. 3 http://simplecoding.org/
  4. 4 http://spreadsheets.google.com/ccc?key=pV8XyUSUOM7ET07rn4n7NYA
  5. 5 http://spreadsheets.google.com/ccc?key=pV8XyUSUOM7ET07rn4n7NYA
  6. 6 http://spreadsheets.google.com/ccc?key=pV8XyUSUOM7ET07rn4n7NYA
  7. 7 http://spreadsheets1.google.com/ccc?key=pV8XyUSUOM7GsmVMLVit0Hw
  8. 8 http://spket.com/
  9. 9 http://www.eclipse.org/pdt/
  10. 10 http://www.zend.com/en/products/studio/
  11. 11 http://www.netbeans.org/
  12. 12 http://blogs.sun.com/netbeansphp/
  13. 13 http://www.aptana.com/
SmashingConf New York

Hold on, Tiger! Thank you for reading the article. Did you know that we also publish printed books and run friendly conferences – crafted for pros like you? Like SmashingConf Barcelona, on October 25–26, with smart design patterns and front-end techniques.

↑ Back to top Tweet itShare on Facebook

Alexander Makarov is a professional Web developer in Russia. He is also the person behind RMCreative, a Russian blog dedicated to Web developers, designers and everyone interested in how the Web is built.

  1. 1

    Ehm … and what about code folding? That’s one pretty addictive feature!

    6
  2. 2

    Yeah, these are cool, but I use coda.

    -2
  3. 3

    You should also look at phpDesigner by MPSOFTWARE. Very light and stable and also very cheap. Just recently bought mine.

    0
  4. 4

    I still find Rapid PHP the best IDE out there. Customizable, feature-full but doesn’t feel bogged down and it’s only about $40 (lengthy trial version available).

    http://www.blumentals.net/

    Tried most of the others you’ve referenced and none ‘fit’ as well for me. Might be as about half the coding I do is procedural/inline as opposed to straight OOP and it seems to handle that best.

    0
  5. 5

    Microsoft Expression Web 2 provides php syntax coloring, code completion (IntelliSense), a development server that doesn’t require configuration (and also serves up asp.net pages), and common php scripts for quick insertion.

    0
  6. 6

    Right now I’m using PDT 2.0 on linux.
    Before I was using the easyeclipse distribution. For syntax hilight I prefer easyeclipse that supports also smarty, but on linux has serious problem of stability.
    For PDT exists a plugin called smartypdt, but It doen’t work for the last version of PDT.

    How about the other ides ?

    2
  7. 7

    I was surprised not to see komodo ide in this test (why bother comparing various version of the same product like pdt 1 / 2 ?).

    Check it out: http://www.activestate.com/komodo/

    1
  8. 8

    Nice article and really complete comparison table! Personally I’ve been using Notepad and Notepad++. There’s also Komodo Edit, a free (open source) PHP IDE that I’ll probably try out soon.

    0
  9. 9

    Trevor - 14 Year Old Blogger

    February 11, 2009 5:13 pm

    Informative article. Gives me a lot to think about.

    0
  10. 10

    To be honest I tried before Zend Studio and is the best IDE i’ve tried in my PHP life. The problem with Zend Studio is the cost.
    After the Zend’s trial, I moved to e-texteditor (TextMate for Windows) and it’s ok, but I miss Zend Studio.
    Could you tell me which of this IDEs is the most like Zend? I tried NetBeans and I didn’t like something but I don’t remember.
    Have anybody tried also the Zend PDT (NOT the Zend Studio, I mean the Eclipse with all the Zend stuff).

    Great article (as ever)

    0
  11. 11

    There is an eclipse SFTP plugin called ESftp ( http://www.chris-alex-thomas.com/projects/esftp/ ). So all those eclipse ide’s can check off that in your spread sheet.

    0
  12. 12

    Nice article! I am very helpful !

    0
  13. 13

    Permana Jayanta

    February 11, 2009 5:44 pm

    I Use netbeans …. it really suite my needs …

    0
  14. 14

    I’m a huge fan of PDT, I develop in flax a lot too soo being able to have everything in a eclipse based IDE make life soo much easier.

    1
  15. 15

    I’ve been using Komodo Edit since I changed my computer for a Mac.
    It’s a little bit confusing at the start for those used to standard and basic text editors like Notepad and Textpad, but once you’re use to it, it’s really more efficient to work with these IDE tools. So, as I’m happy with Komodo Edit, I would recommend it.

    0
  16. 16

    What about PHPEclipse? It predates PDT and I still think PDT is playing catch up.

    0
  17. 17

    vim

    2
  18. 18

    I’ve added Panic’s Coda to the list. It’s a Mac application.
    http://www.panic.com/coda/

    -1
  19. 19

    Currently, I’m using Zend Studio 5.5 (not Eclipse-based) and it’s awesome..

    5
  20. 20

    @Kenneth – I’ve tried phpDesigner2006 and 2007. I liked 2006 better. What version do you use, and how does it compare to these other versions?

    I just use Notepad++, and I have some complaints, but it’s like a good friend; Hard to walk away from.

    1

↑ Back to top