PHP IDEs
Programming editors are a very personal choice but for serious PHP there are a few must-have features such as autocomplete and code hints (bring up lists of variable and function names, showing parameters) and context-sensitive help (instantly see documentation for a particular function). I’ve used Zend for a while but when Zend for Eclipse was released I was very disappointed and this led me on a tour round all the top-end PHP IDEs.
Turns out I ended up back at Zend Studio classic and I’m going to stick with it. I made some notes on the way, I can’t say they’re complete or fair, it’s just my opinion. If I only say negative things about an IDE, it’s because I’m too busy and I have to discard it quickly if it doesn’t do what I need.
Zend Studio classic
It doesn’t look slick and performance is horrible until you tweak some settings (Java heap memory and OS look and feel, YMMV) but the actual editor itself is top notch and just works the way I like it. It parses the project and does subsequent function looks up quickly. It’s commenting functions are lovely – Ctrl-/ to comment a line, wherever I am on that line, uncomment it if it’s already commented. Most other editors can’t get this right. It’s auto-quoting, auto-bracketing etc are also very intelligent. If you type your own closing quote the editor realises this and get’s rid of it’s automatic one. Very few other editors get this right either.
For all it’s faults, in the middle of a project, it’s better the devil you know.
Zend for Eclipse
Is it just me? I can’t live without word wrap. Maybe it does make the display look messy, but I want to see everything at once. Most other editors manage it, but it’s obviously not a priority for Eclipse so there must be millions of developers who don’t need it. I do. (There is a plugin but it’s in the early stages of development and seems to break other features.) So that rules it out before I get to annoying performance problems.
NuSphere PHPEd
When I search a file, I want it to zip through the file, get to the end and start from the beginning again without interrupting me until it has searched back to the point where I started. It might seem like a small thing, but if I get interrupted to be told that the search will start again from the beginning of the file or even worse, I have to Ctrl-F again and choose “search backwards”, it seriously disrupts my workflow. I think it’s called circular search. So NuSphere fails on this point.
On the other hand its autocomplete and context-sensitive help are good and it has my personal favourite feature from Zend – control-click a function name to go to it’s declaration.
Waterproof PHPEdit (beta)
Why can’t I unclip the code browser and put it at the other side so I have the project browser on the left, the editor in the middle and the code browser on the right? Update: Turns out it can! My mistake.
And why can’t the code browser open at the file I’m editing so I don’t have to click into it to find where I am? I also found that the Subversion status on files in the project browser wasn’t updating. Maybe that’ll be fixed when it’s out of beta. Update: it is. Good work. I’m trying this again and liking it a lot.
Komodo
Start with the good: circular search, duplicate line (another of my favourite features), Javascript autocomplete. Unfortunately it’s let down by “jump to function declaration” not working most of the time, unintelligent commenting and auto-quoting and the same code browser problems as above.
PHPDesigner
Control click to got to function definition and a quick way to add a phpdoc comment with basic tags to a function are good features but they’re eclipsed by bad circular search, commenting and autoquotes. These are niggling things but I gave up when it overwrote some characters when I was typing. Don’t mess with my code!
RapidPHP
It didn’t seem to have an “allow cursor beyond EOL” setting to turn off. i.e. I don’t want my cursor sitting in no man’s land.
EnginSite
The “go to function declaration” feature only seemed to work if the file of declared function had been “included” in the current file. What’s the point of the editor knowing about my project if it can’t look up what’s in it? It also refused to opened file types it didn’t recognise, even though I had included them in the project. And another thing – the project browser showed an alphabetical list of all the files! I need to see the directory structure. All too quirky.
NetBeans PHP
Very slow. “Go to declaration” is particularly slow. No word wrap (what is it with these well established general purpose editors? Am I not a proper developer?). No PHP code hints as far as I could see.
Delphi for PHP
No word wrap. Cursor out in the middle of nowhere again. See ya.
So it’s back to Zend classic. Hopefully Zend can sort out the problems in Eclipse because it has the potential to be great.
Ideal features list:
- word wrap
- plenty of basic text editing features e.g. duplicate line, and options so I can change it if I don’t like it
- intelligent(!) commenting and auto-quoting
- seemless context-sensitive help and autocomplete
- easy circular search
- decent find in files (Zend’s is too slow)
- autocomplete and code hints for HTML and JavaScript
- decent Subversion integration (with Tortoise ideally, or at least let me do shell operations from the project browser)
- standard, configurable interface (what’s with all the custom widgets? Java seems to be part of the problem – Zend’s file dialog is terrible)
- just let me open any file, let me create a file that’s not part of a project, make it easy to create a project, and when I want to open or save a file, put me somewhere obvious so I’m not navigating the file system. In summary – don’t make me think!
- and the moon on a stick