Source.

Yep, PHP is turning 30 this year! Wondering if “PHP is still relevant?” Ever since we have been hearing that PHP is dead. It was “dead” 10 years ago, 5 years ago, and “is dead” today. But somehow - it isn’t. Anyway… happy birthday!

  • BlameTheAntifa@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    24 days ago

    In PHPs defense, it keeps evolving in positive, meaningful ways. If you are up to date with it, it’s quite sophisticated and enjoyable. Doubly so if you use a framework like Laravel.

    • mad_lentil@lemmy.ca
      link
      fedilink
      English
      arrow-up
      0
      ·
      23 days ago

      Yeah last time I used it was with a laravel monolith and actually it wasn’t that bad.

    • SavinDWhales@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      23 days ago

      PHP 8.4 is pretty good, TBH. You absolutely CAN write great code with modern PHP. … Shame that most PHP I touch is legacy code that’s at MOST PHP 7.4 - which is EOL since November '22 and has to be upgraded or replaced. 😬

    • mriswith@lemmy.world
      link
      fedilink
      English
      arrow-up
      0
      ·
      edit-2
      24 days ago

      Most memes or jokes referencing a direct problem in PHP, are old or made by people who haven’t touched the language in a decade(version 7 was in 2015, and it removed/fixed a lot of issues and added needed features).

      There’s also the huge looming thing that a lot of programmers forget: Websites like Wikipedia run on PHP, not to mention the amount of WordPress and similar websites are out there. Which means it will keep going strong. And for a while Facebook also used quite a lot of it, to the point where they made a rudimentary compiler instead of rewriting parts in more efficient languanges.

      • Scrollone@feddit.it
        link
        fedilink
        arrow-up
        0
        ·
        24 days ago

        Also, most of the websites are made with WordPress, which… take a guess, yes, it runs on PHP!

        (even though WordPress is a bad example because it’s written in a horrible and ancient way)

    • marcos@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      24 days ago

      Yeah, if you add tons of extra rules and tools, it can become almost as pleasant as the main Python or Ruby experience.

      Almost.

    • Lovable Sidekick@lemmy.world
      link
      fedilink
      English
      arrow-up
      0
      ·
      24 days ago

      I agree. A lot of people who mock PHP know almost nothing about it but they know they’re supposed to hate it because all the cool kids do.

  • leds@feddit.dk
    link
    fedilink
    arrow-up
    0
    ·
    24 days ago

    Maybe 25 years ago i build my first website for a paying customer ( my dad). I decided to go for php which was new to me at the time.

    I figured it would be too risky ( even back then) to have PHP generate dynamic pages so instead I had php generate static html.

    So whenever website needed updating , for example a new folder with images was added, you could just load the admin.php and it would generate gallery pages for you.

    Would probably still work 25 year later if wasn’t eventually replaced with some WordPress or something

    • GreenKnight23@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      24 days ago

      ruby has so many better reasons to exist beyond that.

      since v3 it performs just as well if not better than Python.

      it has a well documented and lush library of gems that still work even if they are 15 years old.

      ruby gets a lot of shit because everyone ties rails in, which has improved, but is still slow as shit compared to other orms.

      • tyler@programming.dev
        link
        fedilink
        arrow-up
        0
        ·
        24 days ago

        yeah rails is literally the only thing giving ruby a bad name, it’s terrible. Ruby is a beautiful, amazing language, and then people shit all over it because of Rails. I literally had someone complain that ruby is a horrible language, I asked them what they meant, they listed off all rails things, then I showed them the language and they were like “this isn’t what I was using…”.

        in any case I think you really should only use ruby for very small scripts or programs. Nothing enterprisey at all.

        • GreenKnight23@lemmy.world
          link
          fedilink
          arrow-up
          0
          ·
          24 days ago

          I’m complete opposite. I feel ruby is a far more mature solution compared to what enterprises are using; node, python, (new hot language here).

          • tyler@programming.dev
            link
            fedilink
            arrow-up
            0
            ·
            24 days ago

            Most enterprises use Java. Having built many large apps with Ruby and the JVM ecosystem, there’s a reason the JVM is chosen. Same for C#.

            Yes, Ruby is way way more mature than node and Python, but most orgs aren’t building backends with those, or if they do they pretty quickly learn why they shouldn’t (been at two orgs that were moving off of node and python).

  • MNByChoice@midwest.social
    cake
    link
    fedilink
    arrow-up
    0
    ·
    24 days ago

    Yup! Every time we add a new technology, the old does not go away. We just have more (gestures wildly) everything.

    When picking a career specialization, don’t abandon all the old stuff. Some of it makes a lucrative career after others have moved on (HPC, COBOL, on-site servers).

  • ursakhiin@beehaw.org
    link
    fedilink
    arrow-up
    0
    ·
    24 days ago

    PHP will never die. As long as code is written there will be PHP developers there to claim it’s good now.

      • PolarKraken@programming.dev
        link
        fedilink
        English
        arrow-up
        0
        ·
        24 days ago

        Happens a lot - my (quite small) shop was using NestJS for backends and my boss is way more experienced and wise than me. I unintentionally caused us to switch over to Python, which probably sounds as silly as JS to many, but - we deliver dope shit, on time and on budget 🤷‍♂️

      • percent@infosec.pub
        link
        fedilink
        arrow-up
        0
        ·
        24 days ago

        Thanks to web browser development, there has been quite a lot of focus/investment into JS runtime optimizations. Since the server-side runtime environments use those same JS engines, performance tends to be quite good.

      • Zos_Kia@lemmynsfw.com
        link
        fedilink
        arrow-up
        0
        ·
        23 days ago

        It’s very rare that the backend language significantly affects performance. In 99% of apps you could have the most optimized backend written directly in machine language, and you’d just shave off milliseconds.

        That’s because in web development most of the latency comes from i/o (network requests, database access, file access), not from computation being slow.

        • buttnugget@lemmy.world
          link
          fedilink
          arrow-up
          0
          ·
          edit-2
          23 days ago

          So why did Facebook build that whole system of converting C++ to PHP or whatever they did? Was it because they didn’t understand the savings? Or when you scale that high, the savings really are significant? Were there savings?

          Edit to subtract: https://en.wikipedia.org/wiki/HHVM is what it eventually turned into, and apparently it showed significant improvements even above the previous system.

  • Lovable Sidekick@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    edit-2
    24 days ago

    Last week I found the code for the first website I created, way back in the mid 90s. The server-side part was written in Perl.

  • josefo@leminal.space
    link
    fedilink
    arrow-up
    0
    ·
    24 days ago

    It’s true that the fuckers that stayed in PHP now are getting paid insane amounts of money to maintain systems? I’ve heard they are the new cobol people.

    • Lovable Sidekick@lemmy.world
      link
      fedilink
      English
      arrow-up
      0
      ·
      edit-2
      24 days ago

      I doubt that the pay is insane yet. There are a lot more PHP devs than COBOL devs. About half of the web still runs on PHP. It’s true that COBOL runs about half of the financial world, but PHP is less than 30 years old whereas COBOL programs are relics from decades earlier, and generally only get updated minimally if the systems around them change.

    • Scrollone@feddit.it
      link
      fedilink
      arrow-up
      0
      ·
      edit-2
      24 days ago

      But let’s not forget that the WordPress codebase is absolute dogshit.

      And not an example of how to write proper modern PHP.

  • simonced@lemmy.ml
    link
    fedilink
    English
    arrow-up
    0
    ·
    23 days ago

    Array_filter and array_map having the arguments swapped pisses me of so much.!