For an entertaining read from time to time (They only seem to update once or twice a week).
Check out [url=http://thephpwtf.com/]The PHP WTF[/url].
Funny site that highlights some of the worst PHP code you can imagine.
Todays example shows off some great code where apparently the coder didn’t realize you could pull back more than one column at a time with a sql query.
Remeber, it can be funny…but we were all there at one time: even if it was a long, long time ago and only lasted a minute or two. 🙂
I wrote [url=http://thephpwtf.com/index.php?blog=1&title=i_m_smrt&more=1&c=1&tb=1&pb=1]one of these[/url] just two or three years ago when I was getting used to the mighty power of dynamic flexibility. Heck, I think that code is even still in production. /me cringes
I’ve been needing to do a complete rewrite of my site to get rid of some of the cruft (ok, most of it is cruft, even the content). Seeing bad code makes me want to do this even more. However, who else but me will see the bad code?
And that, class, is why I’m a PHP hobbiest rather than a PHP professional.
Just a warning: some of the comments about how the code should look (or work) are not the best. They do not make you say WHF, but…