PHP Development Environment

There have been four phases to the evolution of my PHP development environment. First, I used notepad, FTP and a shared hosting account. WS_FTP to be exact, made by IPSwitch which once sent me a free t-shirt for sending in a testimonial for their website.

Once I took on a job working on a PHP application larger than one file in size (Contact Administrator), the single file per window, single undo abilities of notepad didn’t cut it anymore. I upgraded to TextPad. I gained the convenience of a single window for all open files, syntax highlighting, multiple levels of undo, and the ability to replace patterns in all open files. My routine still consisted of opening all the files in a project in TextPad, writing code, saving, uploading by FTP to the server, and testing the changes live.

It wasn’t until 2005 that things changed significantly. I discovered vim, starting the third phase. I had been managing two servers to run my websites for a few years by now but had only known vi as a text editor that was hard to quit out of. Then I met Amir while working at The Math Forum, a “vi guru”. His copy had color, syntax highlighting, edited multiple files at once, transformed huge blocks of text at a time, ran regular expression replacements in a flash. Watching him code got me hooked. For nearly a year I worked directly on my servers over SSH in PuTTY, editing code on the server with vim.

Then W3Counter came along. It was my most ambitious project yet – a full-blown web statistics service, a competitor for Google Analytics and the likes, to support thousands of simultaneous users, and I wanted to finish it in under a month. It ended up taking around two. This project was bigger and more complex than the PHP scripts I had worked on before, and my knowledge of the language had advanced much past when I developed Contact Administrator. I had gained experience in Java, MVC, frameworks, ORM. I wasn’t going to tackle something like W3Counter with huge files of procedural code.

That’s when I moved on to my current environment. My editor of choice is Eclipse with the PHP extensions, released as the Eclipse PHP IDE. It gives me a view of my directory hierarchy, a browser for my class APIs, code completion and an internal browser.

I combine that with WAMP5 for a local copy of Apache, PHP and MySQL. I keep my development environments up-to-date, and deploy to my live servers with Subversion. Eclipse has TortoiseSVN plugins for easy integration. I set up the Subversion repository after reading Pragmatic Version Control Using Subversion.

What I’m currently working on is a project on top of the Symfony framework. I found it easiest to start off with the sandbox copy rather than linking in Symfony externally from the project. One hitch with this is that the Symfony CLI requires PEAR, which WAMP5 didn’t come with installed, and the included installer script didn’t work correctly (on Windows Vista at least). This go-pear copy worked fine when run from the php directory of my WAMP installation.

When I do still need to transfer a file to a server that’s not under SVN control I’m back to the same software I used in 1996: WS_FTP LE.