
It's always pleasing when you've been sat there all day, coding away in your PHP IDE of choice, to receive an email which starts:
"PhpED 5 is now available. It's the biggest release ever in our 7-year history, with all-new tools for PHP code folding, embedded Mozilla browser, a powerful database form wizard, a completely new look and feel and so much more."
Alllrighty, I'll have me some of that! I logged in, grabbed the new version, backed-up all of my config settings, and installed with fingers crossed. Here is what I've found so far, along with the answer to the million dollar question - are the new features worth the upgrade fee?
Code Folding

At long bloody last! :) PhpED 5 now supports very nifty code folding. Ok, so I admit this isn't exactly a 'killer feature', instead more of a 'catch up with the other IDEs' feature. But even so, they've done it at last, and done it well. You can control where the + / - box appears (in the gutter, on the border, or next to the function title itself). You can control the colours used for the folded areas. As you'd expect, hover long enough over a folded element and you get a pop-up containing whatever is within the fold (or as much of it as it can display on your monitor). The line numbers in the gutter properly change to reflect the folded areas too. It will fold php tags, comments, classes, methods and functions, which should be ample for most people - although I have to confess I'd like to have seen if/else, for and while covered too. You can fold a selected block of code (select it with the mouse and then you can fold it), but this is a bit of a pain especially if the control loop is taller than a single screen of code.
It's a shame it doesn't remember folded functions when you close the PHP file and re-open it, but hey I can always put that in as a feature request.
A fresh lick of paint
Let's face it, PhpED 4 wasn't exactly much of a looker now, was it? I mean compare it to something like Panics Coda and it was positively butt ugly. Version 5 has taken a class at the school of aesthetics, and looks all the better for it. The icons have all been replaced with cleaner, smoother, shiny versions. The splash screen looks the biz, the context menus are more tidy. It's not exactly vital, but when you spend positively HOURS staring at it each day, every little bit helps. I am pleased that they have managed to spruce it up without taking away any screen real-estate or cluttering up the workspace. See the bottom of this article for a full screen shot.
Oh, and I know it's a minor thing - but the new program icon is vastly improved! Especially if you are running Windows Vista (the old icon would scale up horrendously, looking something like a chipped marble). The new one visually just works:
New Toys
Nu-Coder
Unsurprisingly they've gone and built support for their PHP Encoder Nu-Coder directly into the IDE. Just bring up the Project properties and enter the settings in the Encoder tab. Voila, you can now automatically encode before you deploy to a remote server. A great time saver if you actually use the encoder.
DB Wizard
The Database Form Wizard, like the NuSoap Wizard before it, will save you time by creating a set of PHP scripts that can perform CRUD functions on a given database table. Just point the wizard at an existing database account (which must be set-up in your Accounts area) and it'll spit out the files you need for view, update, delete and insert operations. It can additionally create JavaScript for field validation. By modifying the dbwizard.ini file you can heavily customise the template that is created, and a bunch of macros are available to further extend this feature.
If you already use a framework such as Cake then this isn't going to be that useful. But the PHP code it generates is clean, pretty well structured, and easy to modify - so for those 'throw them up quickly' type projects, don't rule out using this.
Mozilla Embedded
PhpED 4 used IE embedded, version 5 now comes with an embedded version of Mozilla too, so you can select between them. If you need to debug a heavily mozilla based site then this is invaluable, but for the most part you may not even notice the difference to be honest.
Could still be better ...
This is a very welcome update, although I'd warrant that ANY update to an application you spend more time with than your spouse, is a welcome thing. I'm not entirely sure it's the best update in 7 years, like the promotional email claimed, but it's certainly not one to be sniffed at. There are of course areas where it could still be heavily improved:
Subversion support
It really REALLY needs native SVN support. Sure, you can sort of get it working by setting up your own macros and using the context menus on files, but honestly SVN has been around for so long now (and the other IDEs have supported it for so long!) that you'd think this would be high on the ToDo list.
CVS Improvements
I'd REALLY like to see the ability to create a CVS toolbar, so you can checkout / add / edit / diff files instantly, without having to right-click a file to do it. You can create your own keyboard short-cuts for the most common tasks (edit / checkout, etc), but there are only so many keys on the keyboard, and PhpED has SO many predefined short-cuts, it becomes a bit of a nightmare managing them all.
More importantly I think it's vitally important they give you the ability to over-ride the CVS diff operation and specify your own 3rd party diff tool such as Windiff or Araxis Merge. Now again,you can sort of get to these tools using the context menu, but it isn't ideal - with Araxis Merge for example you can't diff a file checked into CVS with a local file (probably the most essential task you could want), you can only select two files in the Workspace / Explorer panel and compare those (i.e. only local files).
I really think NuSphere are missing a trick here. They class PhpED as being a professional development tool - and I won't argue with that, because it certainly goes a long way towards it, but in my mind they should be seriously considering the more 'power user' features such as extended compare / diff / merge features very seriously.
Local / Staging / Live
I'd love to be able to define TWO sets of publishing accounts in a Project properties. One for a staging server, and one for the live server. Then you can toggle which server files are saved to. Even better it'd keep a track of which files were modified both locally, on staging and on live, so you can batch sync between the three.
Search and Replace
This was a major bug bear I had with Zend Studio, but they managed to resolve it. 4 years on and PhpED still has one of the weakest search and replace facilities going, let down by just one thing - you can only search/replace a SINGLE LINE OF CODE. This is insane guys. You've got regexp support, you've got 'replace in all open files', you've got 'replace in directories' with full recursion, you included file masks, case sensitivity and even 'whole words only'. Yet the most vital thing of all - the area in which to enter the search/replace text is woefully lacking.
Hell even Homesite (before it was sucked into the behemoth that is now Dreamweaver) offered search/replace with a truly great input window. You could paste in whole lines of text (for both the 'find' and 'replace' fields). What is more - the 'Replace' dialog window never blocked the rest of the IDE (unlike PhpED), meaning even with the window open you could still select text, say from another area in your code, to then paste into the replace field. These two things PhpED needs. Badly.
So there we go
A worthy upgrade? Hell yes. PhpED is still the fastest and most versatile IDE out there. It truly does offer a lot of power all wrapped up in a single interface. Edit code, deploy directly to the server, with a terminal window open, while modifying a database structure, with the best Workspace tools of any IDE I've ever seen. Bliss. Can it be better still? Hell yes, as I've shown. And I haven't touched on all of the new features either, just those that grab you the quickest.
Let's end with a screen shot of the entire IDE in all its glory (click for a full size version).
www.nusphere.com (home of PhpED and Nu-Coder)