Sitting down this evening to code some PHP from scratch after a couple of months of working exclusively in Python, I am stunned to realise how bad plain PHP (PHP4, we're talking about) is. The shop code provides a fairly comprehensive framework on top of standard PHP, wrapping database, output and error handling. Without it, PHP is so much more dreadful than I remember.
I'm actually amazed that PHP doesn't print a stack trace when there's an error. You're clearly not supposed to write functions.
Perhaps I will make the jump to PHP5. There are compatibility issues even now, but maybe it's simply time.