Quick, but not dirty, PHP
Though I’m doing more and more work in Python, I still write a lot of PHP code, especially for quick one-off web automation tasks.
There is plenty of activity on the other end of the scale in the PHP world now: frameworks like Cake, WASP, Solar, TaniPHP, the forthcoming Zend Framework. All this action is very cool, but doesn’t address the one-page script – and the one-page script is still worth doing right.
Many people come into PHP helter-skelter, not realizing that “Wow, it works!” is not the highest level of achievement possible. I don’t offer myself as a PHP guru, but below are some of the conventions (I dare not call them “patterns”) I use that I think are worth passing along.