NuSphere's IDE for PHP Programmersby Jay Greenspan
PHP developers are generally a passionate bunch. They have strong feelings about their favorite language for Web applications development and the comparative failings of other approaches. These emotions usually extend to a specific development tool -- a text editor. Whether it's
vim, HomeSite, TextEdit, or BBedit, most PHP coders have their favorite tool that they swear by.
I know that for me, however, this geeky love fest can turn ugly when it comes time to debug PHP code. Text editors, no matter how well they're designed, are not equipped to help you track down a misspelled variable name, a misplaced argument, or a malfunctioning function. I don't think anyone enjoys the process of sprinkling PHP code with
print_r statements and re-loading pages over and over.
My guess is that some developers who might have chosen PHP because of its power and ease of use went with other languages because PHP lacked an IDE. This need no longer be the case, as no fewer than three companies produce IDEs for PHP (Zend, ActiveState, and NuSphere). This article will give an overview of one of these products: NuSphere's PHPEd.
PHPEd, like all IDEs, is designed to do lot more than any text editor. If an IDE works well, it should cut your development time. So while the transition from some beloved text editor to an IDE might be difficult as you pine for your old macros and shortcuts, in the end it should be worth the time you invest getting to know the new tool.
Using PHPEd, your major time savings will come when debugging code, but since you will spend much of your time typing PHP, I'll start by looking at PHPEd's text editor. Note that PHPEd is currently a Windows-only tool. However, the word is that a Linux version should be released soon. If you're working on another OS, look into one of the other IDEs.
PHPEd's text editor
You'll find that PHPEd competently performs all of the tasks expected of a text editor: its syntax highlighting is fine, and it automatically inserts closing quotes, parentheses, brackets, and curly braces. Figure 1 shows what some syntax-highlighted code looks like in PHPEd. Note that the colors are configurable, which was good for me, because I did not find the default colors aesthetically pleasing.
As you type function names in PHPEd, the text editor displays a function reference, complete with return value and arguments, as shown in Figure 2. If you're currently using a basic text editor for PHP, you might find that this simple feature saves a lot of time, as you don't have to pull open a page from the PHP manual every time you forget the order of arguments in a function.
Similarly, when you type a dollar sign ($), PHPEd automatically displays a window that lists all of the variables that have previously been defined in the active script. At this point, the listing is a bit too extensive, as variables that have been deleted continue to appear in the listing.
Pages: 1, 2