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!

  • lime!@feddit.nu
    link
    fedilink
    English
    arrow-up
    55
    arrow-down
    13
    ·
    22 hours ago

    my entire way of reasoning about programming languages changed when i read on article about how hating on php was misogynistic. i clicked on it because it just sounded like yet another ragebait, but it made sense.

    basically, since php is simple, and integrated with html, the vast majority of php devs started out as designers who later got into code. since php has always been a mess, nobody wanted to build mainstream tooling for it except the people actively working with the language. this means that mainstream ideas about language and tooling design didn’t percolate down to php like it has done to most languages. so php devs, when exposed to tooling the rest of the world takes for granted, are usually overwhelmed because not only is there a lot of it, nobody in php-land uses tools like that. so they get called bad devs of a bad language. some of them, who really like to code, push through this massive difficulty spike, while others just assume that “actual programming” is too hard and go back to design, even though tooling usage has little to do with your skill as a programmer.

    the kicker, of course, being that web design has more women than most other dev specialisations.

    • kshade@lemmy.world
      link
      fedilink
      arrow-up
      25
      ·
      20 hours ago

      Is disliking something that (allegedly) is more popular with women than the average thing of its category anti-woman, even if no part of the complaint involves the user or their gender? The majority of users is likely still male anyway.

      • ChickenLadyLovesLife@lemmy.world
        link
        fedilink
        English
        arrow-up
        4
        ·
        12 hours ago

        Is disliking something that (allegedly) is more popular with women than the average thing of its category anti-woman, even if no part of the complaint involves the user or their gender?

        According to my sister-in-law, yes. I don’t like Taylor Swift’s music and apparently that makes me a misogynist.

      • lime!@feddit.nu
        link
        fedilink
        English
        arrow-up
        17
        arrow-down
        2
        ·
        20 hours ago

        not directly, but trash-talking it and gatekeeping “real programming” from the language most likely to be used by women is not exactly conducive to improved equality in the profession.

        i realise now that i didn’t explicitly mention my point in the first post, so:

        • shitting on other people’s jobs is bad.
        • kshade@lemmy.world
          link
          fedilink
          arrow-up
          9
          ·
          edit-2
          20 hours ago

          So PHP may be trash, but don’t treat the people using it like trash? Makes sense to me.

          • lime!@feddit.nu
            link
            fedilink
            English
            arrow-up
            4
            ·
            17 hours ago

            lift people up instead of pushing them down. we don’t make fun of the language someone is using, we help them get better.

    • lilja@lemmy.ml
      link
      fedilink
      arrow-up
      16
      ·
      22 hours ago

      In the start of my career I felt that there was a sentiment around web dev that it’s not “real” programming in a way. Not sure if that’s the case any more seeing as the majority of modern develoment is for web platforms.

      I’ve never heard the idea that PHP is a language used by web designers who migrated to coding, but it kind of makes sense. How PHP works, where everything is just HTML until the <?php tag comes in, made it so attractive as a way to add some spice to static pages. I cut my teeth on PHP and moved on to other languages later, so it makes sense that it would function as a gateway drug of sorts, also resulting in it not getting the attention from seasoned experts that other languages benefit from.

      Calling dislike of PHP misogynistic feels like a massive stretch… but maybe it’s not considering how the designer/programmer divide also has a massive gender disparity. PHP has its problems, tooling being just one side of it, and its nature as a designer-friendly language makes it easy for elitists to mask their bigotry behind “objective” arguments that PHP is bad.

      • lime!@feddit.nu
        link
        fedilink
        English
        arrow-up
        6
        ·
        20 hours ago

        i think the wording of the original article was intentionally inflammatory, but “the purpose of a system is what it does”. if shit-talking php causes women to leave the profession, it doesn’t really matter what the intent was.

    • magic_lobster_party@fedia.io
      link
      fedilink
      arrow-up
      13
      arrow-down
      4
      ·
      22 hours ago

      The main issue with PHP is that it’s designed for a pre AJAX web. Before when there was a real distinction between backend and frontend. The idea with PHP is that the server code is responsible of generating HTML on the fly.

      Server code generating HTML is icky in modern web development.

      • lime!@feddit.nu
        link
        fedilink
        English
        arrow-up
        24
        arrow-down
        1
        ·
        21 hours ago

        it’s what html was designed for. there’s nothing icky about it. with htmx et al the serverside web is coming back in a big way so we can finally drop this react stuff.

        • magic_lobster_party@fedia.io
          link
          fedilink
          arrow-up
          1
          ·
          19 hours ago

          Now it was a great while ago I wrote anything in PHP. What icks me is the separation of concern. It has a tendency to cause code that’s concerned with logic and rendering at the same time. The act of moving a button can interfere with the logic, and it obfuscates how the entire website looks like.

          Maybe there’s better coding practices to ensure better separation of concern in PHP.

      • Eager Eagle@lemmy.world
        link
        fedilink
        English
        arrow-up
        15
        ·
        20 hours ago

        What’s actually icky is making a website an SPA, duplicating business logic in the back and front, when it could perfectly be served as a server side rendered HTML.

      • shnizmuffin@lemmy.inbutts.lol
        link
        fedilink
        English
        arrow-up
        19
        ·
        21 hours ago

        Server code generating HTML is icky in modern web development.

        There’s been a big uptick in interest around SSR lately, so maybe not.

      • Frezik@lemmy.blahaj.zone
        link
        fedilink
        English
        arrow-up
        7
        arrow-down
        1
        ·
        19 hours ago

        AJAX everything is icky. It’s part of what’s made browser tabs take more RAM than a typical desktop had in 1998.

        I exercised all client side JavaScript from an app I maintain. It’s fast, clean, and the back button always works. I just checked on one of the more complicated pages, and according to Firefox’s memory profile, it takes about 2.6MB of RAM.

        Where PHP really goes wrong is mixing HTML and code by default.

        • bitcrafter@programming.dev
          link
          fedilink
          arrow-up
          3
          ·
          18 hours ago

          I exercised all client side JavaScript from an app I maintain. It’s fast, clean, and the back button always works. I just checked on one of the more complicated pages, and according to Firefox’s memory profile, it takes about 2.6MB of RAM.

          Wow, that really is a light weight! What exercise do you have your code perform to get such impressive results?

          • Frezik@lemmy.blahaj.zone
            link
            fedilink
            arrow-up
            1
            ·
            17 hours ago

            No JavaScript, just HTML and CSS. Basically no images. The heaviest page dumps 50 rows of logs in a table.

            It’s admittedly a fundamentally simple frontend, but we all know of frontends with a simple job and a not so simple frontend.

                • bitcrafter@programming.dev
                  link
                  fedilink
                  arrow-up
                  2
                  ·
                  11 hours ago

                  The belief that exercising one’s code is good? I am certainly all in favor of testing, to be sure!

                  (Sorry, I have been having some playful fun at your expense: the actual word you have been reaching for is excise, e.g., “If only I had exercised more, then I would not have developed a tumor requiring excision!”)

      • Dr. Moose@lemmy.world
        link
        fedilink
        English
        arrow-up
        7
        ·
        20 hours ago

        What absolutely no. Server side generated code is still king in the right hands. Why have client lift all of thay when server side html rendering basically costs nothing. Even strong js driven front end you can still add much through server side by providing proper hydration paths. Good devs take advantage of both worlds but server side is incredibly powerful today.

      • HakFoo@lemmy.sdf.org
        link
        fedilink
        arrow-up
        6
        ·
        edit-2
        20 hours ago

        I believe the huge mistake in HTML wasn’t having some sort of element-level addressability.

        People went insane over “the page flashes for 15ms because we have to reload the header and footer and it doesn’t look NAAATIVE!” and the response was to SPA/AJAX everything, inviting a huge Turing-complete nightmare of possibilities when 95% of what peopleneed would be delivered with < form action=“blah” replace_with_response=“#foo” >

        That and a dearth of native widgets-- a < combobox > and a < menu > that worked like the system menus might have kept JavaScript as the sick oddity it should be.

    • Tonava@sopuli.xyz
      link
      fedilink
      arrow-up
      6
      ·
      22 hours ago

      That tracks, without any background in coding php is very simple to get into. I’m not a woman, but as a personal anecdote I’ve never done anything outside some self-taught hobby-level web designing requiring html and js, and I only know some php because it’s what was easiest to learn by myself to get the stuff I wanted done.

      I’ve looked into actual programming languages a couple times, but I never get far since I don’t need them for anything and all the tutorials start super boringly and won’t tell about the possibilities you could potentially do; it’s assumed you already know. With php I just knew what I needed and did some web searches and found the answers, and that kinda spiraled into leaning along the way. There’s no way to do that if you don’t even know where to start