Skip to content


PHP Makes the Baby Jesus Cry

I’ve always been a huge open source software proponent– this blog is ran by FreeBSD, PHP, WordPress, Apache, MySQL, etc., yet the PHP language has never really sat well with me. It’s always reminded me way too much of a derivative of C for the web, becoming more C++ like with it’s carnation of “Object Oriented Programming” introduced in PHP 5. I really tried to like it long ago back when it was still being called “Personal Homepage” or whatever, but it just never really congealed for me. Granted there are a great number of open source PHP projects that I will continue to use until something better comes along, but I’m glad my income is not dependent on writing PHP. I dabble in it every now and then specifically for this site, but eh…

So on to what inspired this post… A couple of days ago I was looking up something on Wikipedia and was presented with this error message (click to enlarge):

Wikimedia Error: PHP Makes The Baby Jesus Cry

Not that it’s necessarily a good empirical reason to not like PHP, but it certainly does make the baby Jesus cry (much like Perl does). Granted you can write bad code in any language, but wow. If you’ve ever even tried to install the MediaWiki software, you probably have an idea what this codebase is like.

I think my favorite part of the code that my co-worker pointed out is the LoadBalancer.php file listed in the trace. I assumed loadbalancing was already built-in to PHP with functions like loadbalance_on_linux_with_apache(), send_load_to_array(), or cache_connection_to_mysql(), but I guess not, so it needed to be implemented into the MediaWiki code base.

Posted in A Day In The Life Of, ColdFusion, Culture, Geek Humor, PHP. Tagged with , , , , , .

3 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

  1. Heh. I’m reminded of Hani’s recent entry - http://jroller.com/page/fate?e.....re_logging.

    One of the commenters really hit home with this remark: “A an error message is really not the time to tell us about the 648 classes you used just so we can print hello world all of which read like DelegatingPOJOMashallingReflectionProxyStabInTheAssBean. ”
    LOL.
    Even though I’ve helped pick and then use Spring and Hibernate in a past project, I can still identify with that.

  2. Yeah, I love Hani’s rants, they kill me yet dispell truth. That comment reminds me of the Uncyclopedia’s entry about Java– in particular the Hello World examples.

  3. I’m getting really tired of people making vaguely disparaging statements about Perl and PHP (which happen to be two of my favorite languages) without really giving concrete reasons for their dislike. Yes, that error message you saw is awful (although I disagree that stack traces are unnecessary). No, it’s not at all typical of PHP, at least in my experience. The error messages I’m accustomed to getting in PHP development are short and generally informative.

    Note also that that does not look like a PHP-generated error message — more likely it was some sort of error logging generated by MediaWiki. So it’s not really fair to criticize PHP for the fault of an application.

    I also disagree with your comment about MediaWiki installation. Granted, I’ve never tried to do any serious customization on it, but I find it ridiculously easy to install. And the LoadBalancer file? How do you know that that’s not where PHP’s built-in load balancing functions are called? Have you checked the code there, or are you just making assumptions?

    Please, if you’re going to say you dislike a language, at least give some decent reasons.

    And by the way, how on earth is PHP like C?

Some HTML is OK

(required)

(required, but never shared)

or, reply to this post via trackback.