Over the last 8 years I’ve tried out a lot of different setups. I’ve always loved Emacs, and for many years my setup was very basic: Linux/FreeBSD desktop,Fluxbox, Xterm, Emacs and Firefox - simple and powerful, and I loved it but I want more. I want my environment to be a bit smarter and not just provide me with some (very, very nice) shortcuts for navigating my code. About 5 years ago I started thinking there might be better tools/IDEs than Emacs. So I started my quest..
I realize this topic may start an epic flamewar, and I tend to give a bit too negative comments on some things, but that’s just me. Please keep in min that I’m open for everything. Vi/Vim/Emacs? No problem. Eclipse? Maybe. NetBeans, maybe… but do they live up to my requirements?
For the perfect development environment I have a few requirements:
- Must run on Mac
- Code completion for PHP
- Syntax highlighting
For years I’ve been using Eclipse PDT, but it’s starting to get slow. Autocomplete takes 3-4 seconds, and overall I experience issues renaming files and other small bugs.
I started looking around, there are some nice products on the marked. I loved my old setup with Emacs, so I really hoped to find a code completion plugin for it, or maybe Vi/Vim. NetBeans is a player on the marked and certainly worth checking out. So I spend many nights playing with different editors and IDE’s. Here is a summary of the results:
Emacs
Overall HTML+PHP modes provides an excellent tool for my needs. Code completion isn’t good.
I was able to find tools like Autocomplete.el + etags which initially looked good, I was able to get code completion for everything, but not in a good way. Emacs + Autocomplete.el + etags was able to provide me a list of all methods in my entire project, the only problem is that it’s not context aware.
Emacs was not able to figure out where I was in the code or which variables/classes I was working on. On another note, etags is not the perfect solution, because you have to run and generate a new tags file every time you change your code – however I can live with this, but I can’t live with it not being to detect the context I’m trying to complete.
VIM
VIM 7 has some very nice features. They even provide code completion out of the box. VIM takes some time getting used to, but comming from Emacs, I’m used to weird shortcuts and key combinations. Overall VIM was better than Emacs, it could provide with me some in-buffer completion, but still nowhere near perfect. It could do basic completion on the variables and methods on objects, but it is still not context aware. Also I had to look into ctags/etags to make a nice tags file for VIM to understand the whole project (including Zend Framework).
With a tags file I was able to lookup methods and see a small preview of the parameters to the method, which was a very nice addition, but not being context aware, I had to skip and move on.
NetBeans
NetBeans is becoming a bigger player in the PHP community. I’ve been keeping an eye on it for quite some time, but in the beginning it didn’t feel right.
First of all, NetBeans is a great IDE. The autocomplete is spot on, very responsive and gives a nice preview of the parameters + info from PHPDoc blocks.
The downside? Well.. The biggest issue is the way new projects are handled. I can’t create a new project, and check out code from Subversion directly into that project, it simply fails every time. Every time I have to start a new project in NetBeans I spend 15-20 minutes getting my files in the right place, not good enough!
Another anoying thing with NetBeans is that it can’t handle if files are edited outside the IDE. If I create a new controller with zftool, NetBeans will screw up. When trying to commit to Subversion it can detect a new/changed file. But the IDE refuses to update the list of files.
Not being able to change files outside the IDE is not an option for me. This is the main reason I’ve been avoiding NetBeans, otherwise it seems to live up to my requirements. However, the IDE could use a bit of a clean up, sometimes it feels like the toolbars take up too much space.
Eclipse PDT
Eclipse has been my editor of choise for many years. The autocomplete never fails, huge amount of plugins, nice UI and everything.
For me it has two huge downsides:
It’s slow. When working with Zend Framework, there is a huge amount of objects to index, so doing code completion on an object takes several seconds, which is very anoying.
The second thing is that it seems to be getting worse handling renaming of files. Some time ago, they added some nice refactoring support, but as a side note it fucks everything up. Try renaming a directory with multiple subdirectories and files, without having to manually move some files. On top of that, Subversive/Subclipse (I’ve tried both) fails horribly when you rename things. I usually have to copy the directory (which enables me to enter a new name), delete the old one and add the new one to Subversion. Great..?
Aaaaaand the winner is!
None of the above. The real question is which downsides you can live with. I decided that I can’t live without a good autocomplete, which makes it hard for me to find a good IDE. The perfect solution (for me!) would be the autocomplete from NetBeans, the power of Emacs/VIM and the interface from Eclipse..
For now I still use Eclipse. I’ll be checking out NetBeans 6.9 soon, the beta looks promising, so I’ll cross my fingers.
If anyone has been able to do a proper autocomplete setup with VIM/Emacs please tell me about it!
UPDATE:
Thanks for all the great comments, I believe I have some digging to do! Over the next few weeks I’ll look into all the suggestions below, which includes:
- NetBeans 6.9 Beta
- JetBrains’s IDEA
- JetBrains’s PhpStorm
- Komodo
- Zend Studio for Eclipse
Last night I had a quick look at PhpStorm and I must say it looks very, very promising. I’ve also installed the latest NetBeans at the office, looking forward to seeing it in action. I’ll keep you guys updated on the progress.

You should try out IntelliJ’s PhpStorm/WebIDE. http://blogs.jetbrains.com/webide/
I already tried it, it looks promising, but I have not had any success with it’s autocomplete features
hey Ole Hejlskov
I am using vim for more than 3 years , and I find it very smooth
for php programmer .
I find the autocomplete using ctag good
Could you give me some examples on your setup? Did you manage to get the omnifocus autocomplete to be context aware? Please share your setup
yes trey komodo
I’m using NB and have no problems described above. However I don’t use built-in support for SVN, rather use tools which are available for OS. So do chekout outside of Netbeans and be happy. NB recognize all changed and new files almost immediately, it also has scan on demand feature. If you really found such heavy bugs, guys at NB will be happy to fix them, believe me.
How do you trigger the scan on demand? Is there a shortcut or something?
I will be looking into NetBeans 6.9 beta next week, hopefully it will solve some of the issues.
Oh yeah and the Emacs keybindigs rocks!
there is plugin “scan on demand”. usually you don’t need that. Then source->scan for external changes
I’d recommend reading http://blogs.sun.com/netbeansphp/ and forum http://forums.netbeans.org/php-users.html The community is really great and helpful
BTW, did you know NetBeans has Emacs keybindings?
If I were php developer, I’d go for Intellij Idea – http://www.jetbrains.com/idea/features/php_editor.html
I’m 100% sure you are gonna at least like it, if not to choose it as your primary IDE
it’s not for free, but it’s top notch IDE in my opinion, well worth money… I’m not even Intellij employee
ups, I’ve realized that someone pointed out PhpStorm, but:
PhpStorm Roadmap
Apr 2010 — PhpStorm 1.0 Beta
Q2 2010 — PhpStorm 1.0 Release
so no wonder you were not satisfied… thus my previous post is still valid, you should try full-blown IDE from jetbrains, I was using it for php for some time, I found auto-complete pumped up to my satisfaction (I’m php lame developer
I just had a look at PhpStorm’s site, it seems the latest beta has got some more love for their autocomplete, so I will definitely take it for a spin soon.
You should try the new beta of PhpStorm. The code analysis is really amazing and autocompletion is great (analysis is even using phpDoc parameters). I also tried every IDE, but nothing could satisfy my vision.
Seriously? You’re judging most of these IDE/editor’s based on code completion?
i used dreamweaver.waiting for cs5 auto complete object would be nice in big project.
My list of requirements:
# Code completion for PHP
# Syntax highlighting
… and …
# solid debugging / testing / unit tests
# Refactoring / code generation
# A real time built-in PHP interpretation, as well as an understanding of HTML/JavaScript (to pick out JavaScript errors etc)
# built in database connectivity, and a database browser
# of course SVN and all the other cool stuff that is pretty standard with eclipse/net beans
I ended up paying for zend studio, and its been worth the cost. If an open source tool can do all of the above well, i’ll happily switch.
I have been trying NetBeans 6.9 nightlies. It is great, except it’s very slow and sometimes crashes. Especially the scan projects process during the startup takes longer than 6.8.
Try Komodo Edit, it’s like ZDE but Free/Libre Software and fast (python instead of java)
I would be happy with Netbeans or Eclipse, but none of them provides any decent way of working with remote ftp servers directly, which is a must for me. It’s weird that there’s so many php developers and no ide that can provide this.
Not sure about the PC or Linux, but on the Mac, you can use Transmit with your text editor of choice, or use Coda and edit the files remotely on the server. Coda works extremely well in this regard. Textmate + Transmit is also a good combination for this kind of editing.
FTP support was bugging me for many years. To this date, the only IDE I’ve seen with good FTP integration was Zend Studio, before they migrated to the Eclipse platform.
Today I have very few cases where direct FTP support is an issue for me, I usually do it manually with a good client, because my development is done on my local machine.
In my NetBeans tests I noticed they have some support for remote locations, so it might be worth checking out?
I’ve only used it a couple of times, but FTP support in Netbeans really impressed me. All I’ve done is create a new project with remote sources, setup the remote connection to the server, and let netbeans do the rest. It supports FTP and SFTP, plus I think it will use SCP when there is no FTP server. I haven’t had any problems with it, but like I said, only used it a few times.
I’ve started using Aptana and really like it. You need to jump a bit through the hoops of the PHP integration but it’s very easy. and it’s free.
Have you tried TextMate? Most of the editors you list are based on the Eclipse engine, and they all suffer the same problem – they’re written in Java, and Java is slow. TextMate, being a native Cocoa app is very speedy and lightweight. It’s has awesome code completion, and is the most extensible editor available for the Mac.
Well not all of them are based on Eclipse, and I do not necessarily agree that java apps are slow.
I’ve tried Textmate, it is indeed a great editor, however I have not been successful in finding some autocomplete plugins. The editor comes with autocomplete, but it can only provide autocomplete on the built in functions in PHP. I haven’t been able to find any recent info on the subject (all blogposts seems to be two years old), do I kind of hit a dead end.
If you have any info on the matter, please enlighten me
A warning about Zend Studio: http://forums.zend.com/viewtopic.php?f=59&t=6035
It’s PDT + some Zend Framework features. Support sucks, releases are few, community interaction is non-existant, and the price tag is off the charts.
The most frustrating thing for me with Zend Studio was that when new features/bugs were introduced into Eclipse, Zend Studio automatically inherited them.
Example: In the past, if a method paramater had a default value (ie: public function($foo=’bar’)) – I could see that default value in the autocomplete list. Or, if a method parameter was using type hinting, I could see that too. This was removed in the latest release of Zend Studio? Why? Because it was removed in PDT as well due to a new update of Eclipse. Lame!
Example 2: When searching files, I could expand the list of found entries. So if I search for “foo” and inc/common.php has 3 occurrences of “foo”, I could expand inc/common.php in the search result list and see every occurrence. This was removed in the last update as well due to it not being in PDT.
I have my own reservations for Zend Studio for Eclipse, when they first released it I tried it out, but found that it did not provide anything usefull (for me), that I could not find in PDT.
However, it’s been a long time since I tried it out, so I’ll give it a spin, but I must say I’m a bit worried about the link you posted to the forums.
I’ll go in the same direction as Ted.
You should really try Coda since you are on a mac or even Textmate which has all the features.
Transmit is a very good user friendly ftp client.
I tried Coda last year, and while it initially looks like a great IDE/editor (not really sure how to categorize this one), it still lacks code completion, which is one of my few requirements.
The same goes for Textmate (as far as I can tell, textmate only provides completion for built-in functions).
They’re both great editors, but without code completion I’m lost..
Try Aptana Studio.
There is a great little open source php IDE called Dev-PHP. It appears to be under active development.
I don’t think it quite reaches your autocompletion needs yet but perhaps with a little encouragement and help they could leap to the next level.
Also has a portable version.
http://devphp.sourceforge.net
I use and recommend NuSphere PhpEd 5.8.
. It lacks an internal implementation of other versioning systems (it has only CVS) like SVN, GIT or mercurial.
I also tested a looot of IDE’s but this one is the fastest around and full featured
NetBeans has a good php implementation but the ftp sistem is very very weak compared to Zend 7 or PHPed.
Hello Ole,
I am using emacs myself for a couple of years but lacked some of the patience to get it to its full potential. I think lisp (Lots of Irritating Superfluous Parentheses) has something to do with it!
I would like to hire a good emacs user who can help me get my emacs setup to the next level.
Would that be something you’d be interested in? If so, please feel free to contact me.
Thanks.
PS: I like your writing style.
Hi Christian
Well, I if you’ve been using Emacs for a couple of years already, I don’t really think there is anything I can do to help take it to the next level.
I’m no LISP hacker, so I’m afraid there isn’t much I can do.
Besides, I was not able to get a decent setup working with Emacs. The autocomplete fails to work in a proper manner..