When many people first enter the web development scene with PHP, one of the first things they ask is “What’s a Good IDE to use?” If you go ask a bunch of C or Java developers, you’ll start a heated debate. Go ask some PHP developers and you’ll either get not much of response or you’ll get laughed at. It’s true — in PHP, most developers simply do not use an IDE. In many ways, this does make sense. PHP is an interpreted web language. There’s no need to click “build” to compile the project. It’s not even necessary to execute a ton of files at once to run. Simply open the file of interest in a web browser with an Apache server and it works. To retest after a change, refreshing the browser is all it takes.
So why would anyone want an IDE for PHP development? For very large projects with many sub-directories, it would help with efficient navigation. Time spent on clicking through several levels of directories is time lost on writing code. In addition, an Apache process running in the background might eat up too much memory for unnecessary features. An IDE can create a temporary PHP process when testing saving system resources at other times.
NetBeans, by Oracle (originally Sun Microsystems), is an IDE optimized for Java development. In fact, being the official Java IDE, it is likely the most popular IDE of that language. PHP was introduced just a few years ago with the release of NetBeans 6.5. It offers the usual features of an IDE including syntax highlighting, error highlighting, a debugger (xdebug) and code analysis. Its code analysis makes it easy to identify potential mistakes in the code by reporting issues such as unused local variables — issues typically reported by compilers of compiled languages.
For PHP support, download at minimum, the PHP bundle. For Java, C/C++, … support in addition to PHP, a complete bundle is available. Downloads are available here.
Eclipse is another IDE targeted at Java developers. Like NetBeans, it also has an option for PHP development. (Must be a lot of Java developers doing PHP…) Unlike NetBeans, PHP support in Eclipse is provided by a plugin. (Eclipse is a plugin-based platform) The features presented by the plugin are comparable to those provided by NetBeans though not quite as polished at first glance. I have not extensively tested this plugin so I cannot comment on how its features compare in quality to those of NetBeans. A basic test showed that its core functions work.
Zend provides an all-in-one Eclipse IDE + PHP plugin installer. For those who already have Eclipse, the plugin can be downloaded separately. Note that for the debugger (xdebug) to work, it must be downloaded separately.
Despite the benefits and features of an integrated environment, I find that it’s simply easier to use a regular text editor combined with a running Apache process. Perhaps you’ll feel differently. Give these a try and maybe you’ll end up using them. As for me, it’s back to Notepad++.