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."

13 of 281 comments (clear)

  1. PHP is great by binarylarry · · Score: 5, Insightful

    The great thing about PHP is that it's the one language that native, Java, .NET, python and ruby guys can all make fun of together.

    Here's to another 20 years (or maybe 19, depends)!

    --
    Mod me down, my New Earth Global Warmingist friends!
    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. 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.

    3. Re:PHP is great by Anonymous Coward · · Score: 5, Informative

      thin shim between C libraries
      That is a great point. Since the Microsoft fanbois hate Linux, they hate PHP. PHP is basically a way to call C libraries. That is why the library naming conventions in PHP are so inconsistent. It's because PHP is exposing those libraries, with all of their individual quirks, to an easy to use scripting language.

      Where I work, we converted a C-based CGI program that was developed from 1994 until 2009. At peak, I think we had nine C developers working on it. It took us only six months with three PHP developers to write a good PHP replacement that called our C libraries. Now I have two new college grads that are very productive adding features to the web site whereas before, I had expensive C programmers each with more than ten years of experience that took dozens of times longer to complete tasks. PHP has cut our development overhead by probably 80%. Now the three remaining C programmers can work on interesting projects rather than on web pages. PHP has, and this is not an exaggeration, saved my company.

    4. Re: PHP is great by oobayly · · Score: 5, Funny

      mysqli_real_escape_string has been deprecated. You should be using mysqli_real_escape_string_honest_guv_we_won't_change_this_again

    5. Re:PHP is great by phantomfive · · Score: 5, Insightful

      Yes, the PHP code is harder to maintain long term,

      Do you understand that the vast majority of time spent on a software project is maintenance? If you optimize for the initial development, you are wasting your time.

      The only real weakness I've seen is that PHP-GTK is not very well maintained.

      ok, now you're just trolling.

      --
      "First they came for the slanderers and i said nothing."
    6. Re: PHP is great by zieroh · · Score: 5, Insightful

      No it really is a pile of garbage.

      The very best programmers that I've encountered in my long career were the ones that could make the code sing (figuratively speaking) regardless of the environment. Any language, any OS, any hardware -- none of these things ultimately matter. All those things will be replaced by something better (or maybe worse) at some point in the future. Being able to put aside juvenile biases and petty preferences is a hallmark of the truly great programmer.

      The very worst programmers that I've encountered were the ones that bitched and whined endlessly about minute details, or those who let their pure philosophical ideals get in the way of the task at hand. They adopt stupid star-belly-sneetches attitudes for the sake of appearing smart among their peers, slagging that which they do not approve of.

      Guess which one you are.

      --
      People who say "sheeple" have about as much sophistication as an AOL user, and in fact are probably actually AOL users.
    7. Re: PHP is great by zenbi · · Score: 5, Informative

      Try using it. It's an alias to another function that requires an optional library that ... doesn't implement the function.

      What? HTTP redirects with the header() function have been simple and consistent the entire lifetime of the language. The function is not an alias and does not require an optional library as you claim. I especially like that it exposes the underlying HTTP headers of the protocol instead of wrapping the redirect into some type of hidden Response.Redirect() type function. This "lower level" makes understanding and debugging redirect problems much more obvious.

  2. Holy crap by DoofusOfDeath · · Score: 5, Funny

    "PHP has matured into a scripting language that is especially suited to solve the Web problem."

    This almost makes me wish Dice would go back to starting its flame-wars with stories on gender inequality.

  3. Why PHP Won by Anonymous Coward · · Score: 5, Informative

    Hello world in PHP:

    Hello world!

    No Bullshit Boilerplate (TM), no needing 5KLoC of code and configuration, no application server to babysit 24/7, no need for catalina+tomcat+jakarta+jre+struts+hibernate+Xmxwtfbbq16GB, just load one module and every single customer sharing the server can use it... No need to understand the CGI protocol, no need to understand the HTTP protocol, no need to understand HTML even.

  4. A poor workman... by helixcode123 · · Score: 5, Insightful

    ... blames his tools. Crap code an be written in any language. Good code can be written in PHP. While not my first choice of languages, I have found myself on PHP projects and been fairly comfortable using it although during moments of frustration put in comments such as "These following 10 lines could be written in the following one line of Perl...".

    --

    In a band? Use WheresTheGig for free.

  5. Re:When does the powerhouse part start? by amicusNYCL · · Score: 5, Insightful

    PHP does nothing to help programmers write sane, maintainable code.

    PHP does nothing to force programmers to write good code. It also doesn't force you to write bad code. It doesn't do anything, actually, other than waiting for you to use it however you want to. That means that the fact that you produce good or bad code is a reflection of your abilities instead of the language.

    --
    "Our two-party system is like a bowl of shit looking at itself in a mirror." - Lewis Black
  6. Re:Cue non-programmers linking "A fractal of bad d by JustAnotherOldGuy · · Score: 5, Insightful

    Actually, you're mistaken. I understand exactly what I need to do to get the results I want, and doing it in PHP earned me a nice living. Using PHP (the LAMP stack, really) has allowed me to work for myself, create businesses, earn money, and live pretty well. I have a hard time understanding what you don't like about that, unless it's based in jealousy. If you don't like PHP, don't use it. You're welcome to use whatever programming language you like without fear of me telling you why you're "wrong".

    --
    Just cruising through this digital world at 33 1/3 rpm...