-
Playing golf with PHP
One of my geekiest hobbies is playing golf. Not the 18 holes of weathered drudgery kind, but the 18 hours of staring at the same 2 lines of code kind. If you still don’t know what I’m talking about, the aim of the game is solve a given problem in the smallest amount of code [...]
-
The adventure of PHP and the magic quotes
Back in PHP 2, the “magic quotes” setting seemed like a great idea. It would automatically escape all of your input so you didn’t have to worry about those pesky SQL injections. Any dodgy characters entered by the user would be automatically escaped by a backslash.
Like register_globals, it helped lower the barrier of entry to building a dynamic website by removing some of the complexity. However it certainly wasn’t without sacrifice, problems with the implementation quickly appeared and continued to abound for the next ten years. Finally in PHP 5.2.2 we got an implementation which (as far as its intentions went) seemed to be bug free, but of course by then it was turned off by default and was already slated to be dropped in PHP 6.