• Arthur Besse@lemmy.ml
    link
    fedilink
    arrow-up
    3
    ·
    edit-2
    1 year ago

    This is an irritating meme.

    Were people saying PHP was dead in 1995, the year it was released? I guess maybe?

    But who was suggesting abandoning PHP for Django in 2003, two years before the latter was publicly released? I suppose the person who made this must’ve read that Django development started in 2003 and gone with that; most of these years correspond with when the respective project started.

    So, the reason Perl (which remained more popular for web development than PHP or any of these things into the early 2000s) isn’t on the list must be because it actually predates PHP.

    But then what is up with Python in 2022?

    • paholg@lemm.ee
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      I also appreciate that you’re supposed to learn Django 19 years before you learn Python.

  • mrbubblesort@kbin.social
    link
    fedilink
    arrow-up
    2
    ·
    1 year ago

    People who say PHP is shit haven’t really used it and are just repeating the memes. It’s a perfectly fine language and there are a number of excellent tools and frameworks for it. It’s reputation is a result of it’s easy entry and widespread use. A whole lot of people who knew just enough to be dangerous made a whole lot of stuff, and it ended up causing a whole lot of problems. But for some reason devs shit on the language instead of shitting on the devs who put them in a mess.

    • ahto@feddit.de
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      It has also improved a lot in the last years. PHP5 and especially versions older than that weren’t very good and deserved a lot of the criticism. PHP7 and onward are much better languages and don’t deserve the hate.

    • frezik@midwest.social
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      Nah, it’s historically been a special kind of shit. It started life as a Perl templating engine, then grew out to its own language where it repeated all of Perl’s mistakes while adding more of its own. Its community was single-handedly responsible for keeping SQL injection attacks in the OWASP Top 10 list for years. Notice that it’s now bundled with “injection attacks” as a generic label for a wider range of similar issues–SQL injection alone would no longer warrant being there. Its conflation of arrays and hash maps meant it took years to wrestle with algorithmic complexity attacks. Perl kept the two separate, and was able to get a patch out for algorithmic complexity almost immediately (though it turned out to have a few bugs of its own, and a true fix came in a few years later; still faster than PHP solved it).

      The web from 1998 through 2010 or so was absolutely riddled with bad PHP programs. “But that’s not the language’s fault”, you say? Doesn’t matter. Community is an important and underappreciated feature of a language, and PHP had a special kind of shit community. It almost seemed designed to suck away the dross from all other communities.

      Consider the plugin system for phpBB:

      • Its architecture doesn’t have any kind of hook system for plugins; they’re added by patching the code in place
      • This naturally leads to different plugins interfering with each other
      • Having done that, you might choose one of the patch formats already out there, but phpBB decide to create their own
      • There are, at first, no tools available to automatically patch in plugins, so administrators (often not developers themselves) need to hand edit the source files and modify the database (the plugin format specifies both together)
      • Tools start to emerge over the years to handle it automatically, but they’re buggy and unusable for a long time

      Is it PHP’s fault that one major application was implemented so poorly? YES! Its community is a feature, and its community is what brought us to this.

      You want to claim that the language has done better since PHP7? Alright, that’s fine. I still don’t care. There are so many better options available, and I don’t have time to keep up with all of them. I’m happy relegating PHP to being a long-tail language where it trails off slowly over the years like COBOL.

  • vsis@feddit.cl
    link
    fedilink
    English
    arrow-up
    2
    ·
    1 year ago

    There are two kind of programming languages:

    1. The ones everyone complaints about
    2. The ones nobody uses.
  • Tarte@kbin.social
    link
    fedilink
    arrow-up
    1
    ·
    1 year ago

    https://w3techs.com/technologies/overview/programming_language

    On the server-side PHP is used by 76.8% of all websites (a large chunk of that being WordPress). It is not going anywhere, soon. Looking at this statistics, nothing else seems to be even in the same league from a pure usage point of view.

    I have yet to see a reason why it should change. Serious question: What is the disadvantage of using the tried and tested PHP8 compared to the alternatives, if you already know PHP?

  • jagoan@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    1 year ago

    Isn’t Wordpress powering like 40% of the internet? PHP isn’t going anywhere anytime soon.

    For me the weirder part of that meme is Python in 2022?

    • EnderMB@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      1 year ago

      IMO, Ruby is a better Python than Python. It’s simpler, has a cleaner syntax, and if you want to do funky stuff metaprogramming can allow you to do cool, and sometimes unspeakable things. Python has great library support, and slowness and Rails did make Ruby unpopular for a bit, but I would love to see a Ruby resurgence that wasn’t to do with Rails, because it is truly a lovely language to use.

      Hell, I would say that in 2023, it’s easier/faster to get something set up and working in Rails than it is with frameworks like Symfony, Express, ASP.NET, etc.

  • thisfro@slrpnk.net
    link
    fedilink
    arrow-up
    1
    ·
    1 year ago

    I’m sure there are a lot of reasons why PHP is better than Python for the backend, but I created an app wirh Symfony 5 and then an app with Django 4.

    Symfony is so weird compared to Django. With Django I can just sit down and get things done. Symfony always seems to have some quirks which are mostly due to PHP (and me not knowing how to program in PHP).

    That said, PHP hosting is so much easier and cheaper, this probably is important for smaller projects.

    • locuester@lemmy.zip
      link
      fedilink
      English
      arrow-up
      0
      ·
      1 year ago

      Isn’t all hosting containerized at this point? Is hosted, language specific servers still a thing?

      I’ve been out of the market for a while now and just run everything as containers on aws and gcp