Editing code in PHP can be challenging. Plenty of people I know use a simple, programmer-friendly text editor, like TextMate. However, editing code is only the beginning; there are plenty of other things that a programmer has to do beside typing. But even when typing, features like code completion and code documentation are important. I personally wanted to use a free, open source IDE, which leaves only a few options: Eclipse and NetBeans. I say “a few”, because there are multiple versions of Eclipse environments. I have recently evaluated these options, and I made a switch.

The Requirements

My requirements included: Git support (I’ve recently started trying out github.com, which is a pretty nice, inexpensive way to do source code control), PHP code formatting, PHP code completion.

The Bake-Off

I was originally using Eclipse Europa (3.3) with the PDT and the Subclipse plug-in. Naturally, I started here, since I had an environment that worked. I found the JGit/EGit plug-in, which looked promising, but when I tried to install it via Eclipse updates, it said it required 3.4 of the Eclipse Core (which is part of Eclipse Ganymede). I just wasn’t able to figure out how to get a version for Eclipse 3.3, so I moved on…

Next in line was Eclipse Ganymede (3.4). This version of Eclipse is fast, and the JGit plug-in installed without a hitch. The down side is that the PDT plug-in was completely worthless in my configuration. It was unable to use classes from my PEAR installation, and it failed to auto-complete even for classes inside my Eclipse project. I know, I should dutifully document these shortcomings in Jira for PDT, but I’m being a consumer now, not a developer. This left me with one more last-ditch effort…

Finally, I tried the latest NetBeans IDE. I haven’t used NetBeans since the last millennium (it’s fun to be able to say that), and time has been good to NetBeans. JGit installed without a hitch, and despite its scarily-low version number and unsupported status, it has worked like a champ for me. The PHP support is stellar, allowing me to click through even to classes defined in my PEAR installation. Debugging via XDebug is fairly good, although not quite as good as my experience with Eclipse 3.3. My only complaint so far is that, unlike Eclipse, NetBeans appears to have some memory leaks and can’t be left running for days at a time. That, and the UI looks like it was designed by a cartoon character (call it “gratuitous use of the bubble effect”). I’m happy to live with these minor inconveniences, though.

The Winner (for me, anyway)

In the end, I selected NetBeans. Since it’s been so long since I’ve used NetBeans, this feels a little bit like stepping backward in time. But the improvements made to the IDE over the years are remarkable, and it looks like a strong contender for cross-platform IDE of choice.