Help build a better PHP IDE!

Submitted by Larry on 26 March 2009 - 12:45am

There's been a fair bit of talk about PHP IDE's of late. That's not surprising given how useful they can be. (Really, folks, vi can only take you so far.) Most of the attention has been focused on the big boys: Eclipse and its derivatives (both free and commercial), Komodo, and NetBeans. Eclipse and NetBeans are both Java based, and Komodo is based on Mozilla's XUL platform (which also runs Firefox and company). I've been bouncing between them for a while, and haven't really been satisfied with any of them. I usually refer to Eclipse as the one I hate least. :-)

There's a new contender to keep an eye on, though, that is worthy of notice: KDevelop.

Yes, KDevelop, the KDE IDE. Although it focuses mostly on C++/Qt development for developing KDE itself, it does have language bindings for a number of other languages. While PHP has generally not been one of them, one of the KDevelop developers (Milian Wolff) has been working on PHP support for the upcoming KDevelop 4. It's already looking pretty far along, too.

More to the point, Milian has graciously posted detailed instructions on how to download, compile, and use the bleeding edge code. There are some gotchas along the way, but even as a non-C++ developer who avoids compilers like the plague I was able to get the dev versions of KDevelop and the PHP plugin running without too much hassle. (Be sure to see the comments in that thread; they're very helpful.) So far I'm reasonably impressed. It's very clearly still development code and has a ways to go yet, but it's usable development code.

So where do you come in? What's the resource in the least supply on most open source projects? Testers! Even if you don't know C++ or Qt the project could use people trying out and testing the code. Find and report bugs, file feature suggestions, and even post patches if you're one of those strange people who is fluent in both PHP and Qt. (I know there's a few of you out there in Drupal land, and Milian is a Drupal user himself. Time for some inter-project cooperation!) All those things we are always begging users and testers to do on our projects, let's try and do (and do well) for this project.

Why is KDevelop PHP support so important, when we've already got so many PHP IDEs out there? Well for one, to be honest they all suck. Zend Studio 5.5 is the only PHP IDE I've used to date that I don't actively dislike for some reason, but it's effectively dead at this point. For another, KDevelop is written in C++/Qt and compiled to native code. OK, OK, I know the old "Java is slow!" arguments have been largely answered over the years, but let's be honest; Eclipse is still dog slow, and when last I used them Komodo and NetBeans were not much better. Whether due to the language or not, a faster IDE is always a good thing. For me in particular, I use KDE as my main desktop so having an IDE that uses all of the GUI tools that I already have loaded rather than loading up the entirety of SWT or XUL is good for performance as well, and gives a much nicer UI and integrated desktop experience.

And because open source survives by active support, and projects that support PHP should be actively supported. :-)

Let's see if we can help the KDE project help us.

Maybe I'm just an picky curmudgeon like Larry, but I too have not found anything that I like as well as Zend 5.5. Overall I find Eclipse detestable and feature/UX poor as well as slow. Netbeans is less slow and has a much better use experience but it is still somewhat lacking compared to Zend. The main thing that drives me nuts about Netbeans so far is the speed at which it filters files in the "open file..." dialog box.

So it looks like I'm gonna have to give KDevelop a try, and try to see if I can at least suggest the things that I liked about Zend 5.5 or see how well they work with the KDevelop platform.

Much like you, I prefer Studio 5.5. to all the alternatives mentioned, and this is my daily tool at work;

To remaining in the available no cost solutions, Netbeans sucks indeed less than Eclipse, especially on remote-mounted SSH file systems. On Linux, though, the focus loss issues tend to drive me mad.

Oh, and you might want to at least take a look at "Delphi for PHP" and Codelobster, the IDE for Drupal.

Well, really, there's two people working on the code side of things - Niko Sams is also a big part of it (and in fact until two months ago Millian joined the team and started churning out amazing amounts of work). Until around new years', the PHP support was not really useable, but then suddenly everything started coming together, and these days i can't really see myself use anything else. There's things in it that are missing or glitchy, but for a product with a TODO as long as KDev's PHP support has it, it's really amazingly useable already - it's seriously on the road to greatness :)

So, in short, good idea! We need a couple of extra people on this thing, there's amazing things in the future for this stuff. Niko is currently working on the generic debugging framework for kdevelop, and of course he's using XDebug as one of the sample implementations ;)

I've been using PHPed for about 4 years now after living with ConTEXT (which is an awesome text editor, but that's about it). I tried Zend Studio a bit, and I've played with both Eclipse and Netbeans, but in my opinion, they can't hold a candle to PHPed. It's Windows-only, but it runs surprisingly well in Wine if you need it to. (I'm guessing KDevelop will likely surpass it in Linux for this reason.) But the feature set is amazing, and it's very, very fast. It also is under constant active development for bug fixes and new features. You should try it, if you haven't already.

Yeah, I am specifically looking for an open source IDE that will run directly (non-emulated) on Linux. If I can run it on the Mac at work as well that's even better, but Windows is actually the platform I care about least as I do not even use it anymore. (Which is wonderful except for the fact that I'm forced to use a Mac. :-) )

Arg... if there would be an awesome IDE on Linux for PHP Dev I would seriously consider a switch from win to linux, since I guess KDE is not going to be available on windows.

But I actually quite like Eclipse. Oky. It's a bit slow, and somehow the PTD is playing weird these days, but other than that?! ... Guess it's because I first started with Java.

I looked into this a few months ago by installing kdevelop into a VM. At the time, there weren't any packages available with PHP support, and I really didn't want to be compiling it in a VM. Is the PHP plugin now in the repository, or do you still have to build everything from scratch?

Also, I really like the built-in SVN and CVS integration in Eclipse. I think kdevelop made you use an external program like ksvn. Any development on this front?

Right now everything is still compiled from source straight out of svn. The original article has a link to detailed instructions on how to get that working, and they've been reasonably successful for me. As I said it's still very much development code, but it's usable development code. And this is the time that they need testers. :-)

KDevelop has the option for integrated CVS and SVN. I don't know how it compares to Eclipse's yet, but then I was never entirely happy with Eclipse's, either.

Did you try Notepad++ with XDebug plugin?
It support server side debug including debug for custom sessions. This solution is light and of course free. I have tried GVim with XDebug, but GVim for Windows run slowly if I compare it with Notepad++. And I don't need all vim features.

So, my suggestion is to try not fully prepared IDE - like GVim+XDebug or Notepad++ and XDebug as alternative for $W.

I am a KDE user too. I use Kubuntu 8.04.2. That means KDE 3.5 still.

Vim is still my favorite "IDE", and works with xdebug too.

Several years ago, I evaluate what was available. Eclipse was not there yet. Komodo was the most functional AND multi platform one.

PHPEd was the best, very polished, everything works, with debugging and all, but apart from having a relatively high price tag, it was Windows only.

Recently I tried PHP Eclipse, since installation was basically "copy to a directory and run a script". Slow to start and a memory hog. Promising though.

I also tried Quanta+ some time back, which works fine, until you use xdebug, and it will debug things fine, but crashes when it exists the scripts.

I used Kdevelop years ago for basic C development and liked it.

Although Larry's article is about KDE 4, I thought I would give the stable kdevelop from the 8.04 repos.

And lo and behold, it does have PHP support. Click on K -> Development -> Kdevelop -> IDE for scripting language.

Here is what I found from an hour of tinkering with it.

  • When importing Drupal's HEAD as a PHP project, it finishes the import then crashes. Don't know why. Not good.
  • If you create a project (choose "Simple PHP script"), then select "Rescan" from the project menu, it sometimes works for a while, but eventually crashes. Double not good.
  • No debugger that I can find. It seems from the article that this is being addressed in a future version.
  • Creating a simple PHP project is easy and works fine.
  • Running PHP from inside Kdevelop works like charm.
  • Supports CVS and SVN (no bzr, hg nor git yet).

Hope it gets better soon ...

You are looking at code which hasn't been touched literally in years - the ancient version that runs on KDE 3 cannot be compared to KDevelop4. While KDevelop3 was a really good tool for C/C++ development, KDevelop4 has been rewritten from scratch (yup, literally), with an entire new framework underneath it. :) So, yeah... KDevelop3 is almost as far removed from KDevelop4 as, say, Eclipse might be ;)

Drydenmaker (not verified)

26 March 2009 - 5:11pm

I have to agree with what you are saying. I moved my whole team over to Zend Studio and we rocked. But we refuse to go to 6 for various reasons, not the least of which, it cant keep up with my typing. That to me is fundamental. I will avoid commenting on all the baggage Eclipse brings with it. Currently nothing handles code completion and debugging better than ZS 5.5. But it is missing all the features in 6. Also I used KDE Web Developer that was coming along quite well when they merged projects with KDevelop. I have no doubt that they could walk right over the top everything else out there with proper support from the community. NetBeans and Komodo just aren't there yet, and Komodo has had plenty of time.

All the other contenders take note, syntax highlighting does not an IDE make.

Just a word to let people running plain Ubuntu (not Kubuntu) or plain Gnome desktops know that you can mix in KDE tools without having to go the whole hog and use a full blown KDE desktop.

On plain Ubuntu/Gnome I am using Konqueror in all its modes, Dolphin and KDevelop (albeit in stock form) and other K stuff just fine.
Just be sure to install the kdebase-kio-plugins (core I/O slaves for KDE) to get that great multi-protocol connectivity.

You can install the packages from Synaptic, aptitude or apt-get, of course.

Victor Kane
http://awebfactory.com.ar
http://projectflowandtracker.com

Anonymous (not verified)

29 March 2009 - 12:39am

> (Really, folks, vi can only take you so far.)

Keep drinking the IDE kool-aid.

Vim:Other Editors::Motorcycle:Volvo

Seriously, when I'm not in Vim I feel like I have cement blocks on my fingers.

I use Coda a fair bit, it doesn't have watches or breakpoints etc... but its better than vi and it does have code complete and easily works with Drupal.

At least in the case of IDEs java rules the Desktop(Eclipse,Netbeans,Intellij).All of them come with extensive plugin support ,but yes..you need a machine with lots of RAM and processing power(They won't work with 128 MB RAM).That said i find the Netbeans PHP IDE an excellent choice for PHP development.You should checkout the latest version.

Just found this page when searching about PHP support in KDevelop. I totally agree that there is a need for good PHP IDE. And let's face it, there are no good ones ... I use Zend 5.5, which I hate the least as you. Other ones are just so slow, that after few minutes using I have to throw them away or I would go crazy. Looking forward to KDevelop though