The odd bit

Once is an accident, twice is a coincidence, three times is an enemy action.

The odd bit - Once is an accident, twice is a coincidence, three times is an enemy action.

The quest for a PHP editor

I’ve had a hate-and-love relationship with a few editors over the past few years, but I’ve never found one that I truly love. Some look promising in the beginning but after some time I really get tired of their limitations.

I thought I had settled with Eclipse (with PDT) because it’s the best I’ve used, but the software update messes up so often it’s not funny anymore. That and those pesky “builders” that keep flagging stuff as errors in places where they’re absolutely useless. So with Eclipse rapidly losing credit I started a new search… without any results so far.

Perhaps my requirements are too steep, but Visual Studio [1] manages to combine them so I don’t think they’re too far-fetched. What I want in a PHP editor (or rather IDE):

  • Projects instead of loose files (think of: Visual Studio solutions or Eclipse projects).
  • Smart intellisense (not just autocomplete, it should be able to parse the project and recognize custom classes – Visual Studio is the reference here).
  • Handle whitespace properly (tabs to spaces, clear trailing whitespace per line, clear empty lines).
  • Formatting (with bonus points if I can configure my own set of rules).
  • A non-cluttered modern interface.

Extra bonus points are awarded to IDEs that can perform small “design-time” checks (e.g. unreachable code, non-returning branch, unused variables, …) and have a couple of refactoring functions/shortcuts (to name two: rename variable/method and implement interface).

So if there’s anyone who knows about a little gem for PHP development, please let me know. Oh, and don’t make me beg 😉

[1]: No, there’s nothing wrong with your eyes. Visual Studio is actually a Microsoft product that I like. It’s simply the best IDE in my very humble opinion.

  • Thomas Koch says:

    Hi Hans,

    I just uploaded a draft of a presentation about VIM as a PHP IDE to my blog. It mainly consists of screenshots of the PHP specific features of VIM.

    2 September 2008 at 08:14
  • Kristof says:

    Hi Hans
    Just wanted to warn you that the trackback message above points to a site containing some malicious code. According to Avast: HTML:Iframe-gen.

    2 September 2008 at 08:16
  • Hans Melis says:

    The trackback is gone now. Thanks for the heads up, Kristof!

    2 September 2008 at 15:49
  • Steven Surowiec says:

    There’s a nice Visual Studio plugin that enables support for PHP with all of Visual Studios regular features (including intellisense). Can download a demo from their site.

    2 September 2008 at 18:50
  • gaetano says:

    Since you mention VS, I presume you’re a windoze user. In such a case, PHPEdit has all the features you demand, and quite a lot more (eg integration with xdebug or a plugin to highlight ezpublish templates). It sadly still has a tendency to lock up, eat all of your memory and crash from time to time.

    2 September 2008 at 23:49
  • Paul Borgermans says:

    Netbeans for PHP (6.5beta) is getting better and better. I favor it slightly over Eclipse now. It has intellisense like features. There is no syntax highlighting for .tpl though.

    5 September 2008 at 10:43
  • Brian Dickson says:

    Hi Hans

    It’s now October 2008 and so I don’t know how you are getting on with your quest for a good PHP editor.

    You position reflects very accurately my own. I’ve used all the most popular on both Windows and Ubuntu Linux. Recently I have used mainly Eclipse PDT with Aptana as a plugin, Gedit, Jedit, Geany…. and the list goes on. I was happy on the whole with Eclipse though it is not without it’s problems, but the last straw came when it was pointed out to me, that an editor I was using was adding (invisible) character formatting within the file. Using Vim I could open the file and see the added coding plainly enough, and because I don’t know how to use Vim I searched all the other editors on my Ubuntu box (which is where I do most of my development work), and it was the KDE text editor ‘Kate’ that was the only one I found that had an option to clean these up. Further use of Kate resulted in more pleasant surprises.

    If you are on a windows m/c, I think notepad++ is astounding, then PSpad, which is a bit more of an IDE, and still free.

    10 October 2008 at 18:26
  • Ruslik says:

    I like Codelobster PHP Edition very much –

    12 October 2012 at 08:29

Your email address will not be published. Required fields are marked *