Writing PHP Code with PHPEd 3.0

If you’re in the market for a good PHP Integrated Development Environment (IDE), you may want to seriously consider NuSphere’s PHPEd product. PHPEd is a powerful IDE that was previously only available for Windows users, but with the recently released 3.0.0 version, is now available for Linux as well.

There are only three major PHP IDEs available, and these include PHPEd, ActiveState’s Komodo, and Zend’s PHPStudio. Out of the three, PHPEd was the last to get a Linux version, but the wait is well worth it. While each IDE has it’s own strengths and weaknesses, PHPEd is probably the most powerful of the pack, and possibly the most feature-rich.

PHPEd is not tied only to the PHP language, however. The code editor also has support for HTML, Perl, Python, C++, Javascript, and others like CSS and ASP. In this respect, PHPEd is extremely versatile and powerful as any web designer’s editor, not necessarily only for someone looking to write PHP code. Like all good IDEs, it uses color-coded syntax and variable highlighting, making any code much easier to read. The code editor also allows you to execute scripts and pass parameters to them within the editor, allowing you to see the results as straight HTML or as if you were viewing the script through your browser. Beyond this, PHPEd has some powerful code completion features as well, such as auto-completing and auto-closing tags and suggesting context-sensitive parameters and HTML entities. It can also track, store, and recommend variable names and use them when appropriate.

Another nice feature is the integrated MySQL and PostgreSQL support, which allows you to view MySQL or PostgreSQL tables, and to modify or update tables using forms generated with the database forms wizard. You can also test and execute SQL queries and statements; all of this is done without leaving PHPEd at all.

All good IDEs also come with some sort of debugger, and PHPEd is no exception. The integrated code debugger is powerful and will help track down syntax and logic errors as you’re writing the code. Unlike some other debuggers, you do not have to add extra code to your scripts; the code debugger runs with no modification to your code. You can watch variable progression within your scripts and view PHP, HTML, and browser output. It also comes with a “listener” function, which allows you to debug any script from any browser and automatically launch PHPEd. All in all, the debugger is quite versatile and powerful.

Another very appealing feature is the integrated web server. This is what makes the debugger work so well as it is not dependent upon an external web server and various modules or extensions being active in the external server. It also comes with an integrated web browser and search utility.

And because most people do not develop code on the same machine that hosts it, PHPEd comes with some remote deployment capabilities, such as the integrated FTP client which can upload and download files from remote servers, and the integrated WebDAV client which helps to deploy code on WebDAV-enabled servers.

New to the 3.0.0 release is the Performance Profiler, and this is an exciting feature. The profiler will allow you identify parts of your code that need performance improvements by tracking code, run time, and total execution time over one or more hits. Instead of relying on server-side caching or speed improvements, the profiler will help you to improve the PHP code itself to be as efficient as possible, which in turn will help you write better code.

Finally, my personal favorite feature. Most IDEs come with some sort of project management features that will group files together into a single project. Currently, PHPEd is the only IDE that comes with CVS (Concurrent Versions System) support. It lets you check out files from CVS and then commit them back to the CVS repository when you’ve finished your modifications. The Windows version comes with it’s own CVS client that will let you log in and out of various CVS repositories. Of course, the standard project management capabilities of grouping files together to form a project, also exists.

From an interface standpoint, PHPEd is very easy to use. The interface is visually appealing and well thought out. You can customize the colors and fonts for each type of supported language, design templates for your code to accelerate development time, and even import other manuals to be available through the help system. This allows you to have manuals such as the PHP manual, MySQL manual, and others available at your fingertips as you are developing your code.

With 3.0.0 being the first version available for both Linux and Windows, cross-platform development is now a reality. Unfortunately, the Linux version is obviously not as mature as the Windows version yet, and it shows. It has the same look as the Windows version without looking as good or feeling as smooth. As development on PHPEd continues, no doubt the Linux version will become more solid, but at the moment, the Windows version is the better of the two. Fortunately, if you purchase PHPEd, you will be able to use it on both, so until the Linux version improves, you can use it under Windows without paying additional license fees.

It is also obvious that NuSphere was determined to give collaborating developers the tool to do the job together better. With the CVS and WebDAV support, multiple developers can work on the same code at the same time without interference. With a lot of web projects available written in PHP and available under various open source licenses, PHPEd is an essential tool for multi-developer applications, of which there are many.