Slashdot Mirror


PHP At 20: From Pet Project To Powerhouse

snydeq writes: Ben Ramsey provides a look at the rise of PHP, the one-time 'silly little project' that has transformed into a Web powerhouse, thanks to flexibility, pragmatism, and a vibrant community of Web devs. "Those early days speak volumes about PHP's impact on Web development. Back then, our options were limited when it came to server-side processing for Web apps. PHP stepped in to fill our need for a tool that would enable us to do dynamic things on the Web. That practical flexibility captured our imaginations, and PHP has since grown up with the Web. Now powering more than 80 percent of the Web, PHP has matured into a scripting language that is especially suited to solve the Web problem. Its unique pedigree tells a story of pragmatism over theory and problem solving over purity."

7 of 281 comments (clear)

  1. Re:PHP is great by Anonymous Coward · · Score: 5, Interesting

    > can all make fun of together.

    I'm a Java dev of nearly twenty years, and I used to make fun of PHP. That was until my company added a team of PHP developers to work on prototypes. Over the past eight years, they have constantly exceeded the productivity of my Java devs by more than tenfold. Yes, the PHP code is harder to maintain long term, but it's amazing how fast you can build things that work. It is the best glue language I've ever seen. Basically it's just a thin shim between C libraries, and no one can argue with the quality and expansiveness of the C libraries available for Linux. PHP lets us use them very, very quickly in web, command line, and GUI apps. The only real weakness I've seen is that PHP-GTK is not very well maintained.

  2. When does the powerhouse part start? by Just+Some+Guy · · Score: 4, Interesting

    PHP is Turing complete, so it's technically possible to write anything in PHP that you could write in another language. That seems to be about the most it's got going for it. PHP does nothing to help programmers write sane, maintainable code. It's almost impossible to develop without having a browser tab open to php.net ("The online docs are great!" "Well, they'd have to be."). There is zero consistency with things like argument order. Dangerous legacy concepts like "mysql_real_escape_string" are only recently deprecated and don't have a set removal schedule. It's a one-trick pony that's nearly useless outside its niche as a web page generation language. It's just a mess - a dangerous, unmaintainable mess.

    I won't refuse to use an app just because it's written in PHP, but I do heavily weight it when comparing alternatives. PHP is a powerhouse in much the same way as McDonald's. It may be ubiquitous, but it still sucks and you have to question the judgement of anyone who chooses it to start a new project.

    --
    Dewey, what part of this looks like authorities should be involved?
    1. Re:When does the powerhouse part start? by drinkypoo · · Score: 3, Interesting

      And Perl code looks like someone who vomited RegEx all over the place...

      To be fair, you don't have to write perl like that, and in theory the optimization is good enough to where you don't actually get anything out of it unless you miss line noise. People just tend to. They write technically beautiful perl, which is a sure road to making someone else cry later.

      I'm not an ubercoder so you can read my perl and I comment it so you can read it even more. So while some perl genius can do much more with perl than I can, my perl is probably more useful to future generations... unless we're going to cryogenically preserve some perl hackers

      --
      "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
  3. Re:PHP is great by Anonymous Coward · · Score: 5, Interesting

    exceeded the productivity of my Java devs by more than tenfold

    On my team of twenty-one devs, we have eleven Java guys and three PHP guys. We do fortnightly sprint planning meetings and score backend tasks as a group. The Java guys do about 50 points per sprint of work. They're very consistent and dependable, which is nice from a management point of view. For the PHP tasks, we schedule 75 points per week. The PHP guys, over the past three years we've been doing this, are doing 5.5 times as much per developer. PHP is amazing.

    The problem is that on a per-Sprint basis, the PHP guys are very inconsistent. Sometimes they'll do two to three times as many points as we planned on, and in a few sprints, they got no points. So even though they're five times more productive on average, our management wants to move everything to Java because it is easier to manage. Also, since we recently released v1, we know PHP maintenance tasks are going to be even more inconsistent wrt time to fix.

  4. Re:Why PHP Won by Anonymous Coward · · Score: 3, Interesting

    It's because in 1996 to do this on a web page:

    <? echo "Today is " . date("Y/m/d") . "<br>"; ?>

    Was AMAZING and easily understandable.

  5. Party like it's 1995! by jtara · · Score: 4, Interesting

    I used the original, or close to it.

    In 1995, I worked for a company in San Diego (MediaShare) that did Tesco's first online store.

    MediaShare had a publishing tool called ProductBase, that put product details in a database, and you could publish to print or CD-ROM (remember those?). I proposed to my boss that we could also easily publish to HTML, and he let me explore it.

    This turned ProductBase into basically a static-site generator, and Mediashare built some sites for some of their existing clients ("the threes" - 3COM and 3M - we put the 3M Adhesives catalog and 3Com's catalog of network products online for the first time) and some new ones.

    One of the new ones was Tesco, and I built a little shopping cart with a very-close-to-1.0 PHP script running under Netscape Server CGI.

    I would have never thought that PHP would still be kicking around this many years later. That was the last time I ever used PHP.

    The author had no pretensions about PHP. It was a simple little script to help him with his personal home page, and he admitted his lack of programming expertise. Others turned it into a Frankenstein's monster.

  6. Re:PHP is great by Anonymous Coward · · Score: 2, Interesting

    > vast majority of time spent on a software project is maintenance?

    True, but the company needs to survive long enough to get to that point. Out of the fifteen start-ups I've worked for in Seattle since the first one in 1983, most failed before we got to the point where we started to do maintenance. Most failed because .NET and Java apps take so much time and effort to get to a minimum product. Having to do maintenance, even if it is harder, is a high quality problem. It means you've survived longer than most. That is why I recommend PHP for all new web projects. You are more likely to successfully build something that is complete enough to put in the hands of customers. With actual customers and revenue, it's much easier to get investments to fix the problems.