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

16 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: 3, Insightful

      Programming languages are complex things. Just because you're not fit to use the tools properly doesn't mean the tools are to blame.

    2. Re: PHP is great by Anonymous Coward · · Score: 3, Insightful

      No it really is a pile of garbage. The fact that it continues to work at all is a testament to the commitment of the maintainers to continue tilting at that particular windmill.

      Why garbage? Here's why:

      1. Standards change all the time. What's the default value for that global? Depends upon the version. What? That global didn't exist when you wrote your code, so you can't check its current value to see if it affects you? Go fuck yourself.

      2. Libraries and APIs are added, replaces, and sundowned at will. Want to do an http redirect in the current version? Go fuck yourself!

      3. Error handling. Look it up. Or, rather, the designers need to do that and then implement something sane, and do it consistently.

      PHP is the only very popular language that is worse than Perl. At least Perl has some advantages to it that make you tolerate the shitty parts. I was about to write "the only thing that PHP has going for it is..." but everything I could come up with to finish that sentence wasn't true.

      It's utter rubbish.

    3. Re:PHP is great by RyuuzakiTetsuya · · Score: 4, Insightful

      I'm currently developing in python after 7 years in the PHP world.

      There are a lot of PHPisms I have grown accustomed to, that I would really like in PHP. Namely, I want var_dump.

      PHP makes a lot of sense to me from the context of a kid who wrote awful raw HTML pages. I just wish we had a mode for PHP that wasn't "here's a pretend HTML page" for all sorts of backend logic. That's the only thing I want from python that isn't in PHP. WSGIServer is a boil on the ass of the python world.

      --
      Non impediti ratione cogitationus.
    4. 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."
    5. 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.
    6. Re: PHP is great by Anonymous Coward · · Score: 2, Insightful

      Atleast ASP was replaced by ASP.Net 15 years ago

      Are you seriously trying to pretend that PHP today is the same language as PHP from fifteen years ago?

      Fifteen years ago, ASP programmers were writing crufty sites with ASP code mixed in directly with their HTML, hard-coded SQL queries, and virtually no structure to the code at all, much less any classes or objects.
      Today, ASP.Net programmers are (mostly) writing good quality code using MVC framework, with NHibernate ORM to talk to the database, all written fully OO.

      Fifteen years ago, PHP programmers were writing crufty sites with PHP code mixed in directly with their HTML, hard-coded SQL queries, and virtually no structure to the code at all, much less any classes or objects.
      Today, modern PHP programmers are (mostly) writing good quality code using Laravel/Zend/Symphony/etc framework, with Eloquent/Docrtine/etc ORM to talk to the database, all written fully OO.

      Just because they didn't add ".Net" to the end of the name doesn't mean that PHP has stood still.

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

    1. Re:A poor workman... by carlhaagen · · Score: 4, Insightful

      As a Perl programmer of 10 years and a PHP programmer of 15 years: this equally swings both ways.

    2. Re:A poor workman... by phantomfive · · Score: 1, Insightful
      Adapted from The Tao of Programming:

      The Tao gave birth to machine language. Machine language gave birth to the assembler.

      The assembler gave birth to the compiler. Now there are ten thousand languages.

      Each language has its purpose, however humble. Each language expresses the Yin and Yang of software. Each language has its place within the Tao.

      But do not program in PHP if you can avoid it.

      --
      "First they came for the slanderers and i said nothing."
    3. Re:A poor workman... by vilanye · · Score: 1, Insightful

      You are misusing that saying.

      What it means it that a good craftsman knows not to use substandard tools.

      A good programmer knows not to use substandard languages like PHP.

      I love that it exists because it is an easy and accurate resume filter. PHP on it? Delete it!

    4. Re:A poor workman... by UnknownSoldier · · Score: 2, Insightful

      I'll probably be downmodded but I'm going to call horseshit on that cliche. While it may be PC to be in denial over crappy tools, the fact remains some tools (programming languages) are well designed and others are not. So yeah, um, no, I don't buy that argument that a poor craftsman blames his tools. It is the good craftsman that is able to spot the crap tools DUE to experience of having used good ones AND crap ones that they can tell what is complete shit.

      Second, just because you CAN write code in Brainfuck doesn't mean you _should_; It is _still_ a crappy language for programming. PHP is no different. It was designed (LOL! Ya, right) and implemented by someone who didn't have a fucking clue what they were doing.

      The problem with a shite language like PHP is two-fold:

      1. The language is inconsistent with too many hidden gotcha's. The == operator is broken that, seriously, you can't make have this dumb shit up. When the official docs has a page called Inconsistent Behaviours you know there is a bigger problem ... PHP was released in 1995 about 4 years after Python. Ruby was around 1995 as well. It is like PHP made every beginner Comp. Sci 101 mistake AND failed to learn from it.

      2. The quality of programmers tends to be extremely poor because they are too busying being apologists for their PHucked uP language.

      We have a name for people who like suffering: Masochists.

      Meanwhile, the rest of us are laughing our asses of at their self-induced suffer over their choice of stupid tools.

  3. Re:When does the powerhouse part start? by ArcadeMan · · Score: 3, Insightful

    When you need low-cost web hosting, PHP is quite often the only choice other than Perl.

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

  4. 80% is misleading by Guspaz · · Score: 3, Insightful

    PHP does not power 80% of the web, it is merely present on at least one server behind 80% of TLDs. That's not the same thing.

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