… Rasmus Lerdorf, that is, the creator and godfather of PHP. He’s got an article on the Oracle Technology Network titled “Do You PHP?” that’s definitely worth a read. Here’s a sample:
What it all boils down to is that PHP was never meant to win any beauty contests. It wasn’t designed to introduce any new revolutionary programming paradigms. It was designed to solve a single problem: the Web problem. That problem can get quite ugly, and sometimes you need an ugly tool to solve your ugly problem. Although a pretty tool may, in fact, be able to solve the problem as well, chances are that an ugly PHP solution can be implemented much quicker and with many fewer resources. That generally sums up PHP’s stubborn function-over-form approach throughout the years….
Despite what the future may hold for PHP, one thing will remain constant. We will continue to fight the complexity to which so many people seem to be addicted. The most complex solution is rarely the right one. Our single-minded direct approach to solving the Web problem is what has set PHP apart from the start, and while other solutions around us seem to get bigger and more complex, we are striving to simplify and streamline PHP and its approach to solving the Web problem.
The guy just oozes common sense. Here’s another bit about PHP that he wrote on the PHP-DEV mailing list about two years ago, one of my favorites that just sums up beautifully the philosophy of PHP:
The golden rules of PHP are to keep the WTF(*) factor low and the POTFP(**) factor high.
(*) What The Fuck
(**) Piss Off The Fewest People
No two ways about it: he’s one of my heroes.
Did he say getting SIMPLER? More STREAMLINED? PHP does quite the opposite. The function library has grown from a decent 100 to thousands upon thousands. Many are duplicates. There is no standard naming.
PHP’s great, but I’ll never buy the "ugly by design, pretty by accident" argument he always gives out (including when I interviewed him).
He said "striving" to be simpler and more streamlined 🙂 The problem is, when you’ve got a system that has grown as big as PHP has, it’s tough to start weeding when you’ve got dozens of gardeners with their own ideas.
The lack of standard naming among functions doesn’t bother me; what gets me is the lack of consistency in the interfaces among similar functions. For example, strpos() and in_array()– both search data for an instance of a value, but the interface for strpos is strpos("haystack", "needle") while the interface for in_array is in_array("needle", "haystack"). This type of thing trips me up a lot.
I didn’t get the "pretty by accident" vibe from that article (or from anything else I’ve read from him)… from the quote snippet I blogged above, he’s calling PHP an ugly tool. 😉