• @lankybiker@lemmy.world
    link
    fedilink
    638 months ago

    PHP is amazing

    If you’re thinking of PHP version less than 8 you need to have another look

    Totally stateless. Uncached server side rendered response times in double digit milliseconds.

    Types

    Extremely battle, highly tested frameworks.

    Excellent tooling for tdd, bdd, static analysis, automated browser testing, coding standards and auto fixing. Even fully automated refactoring for things like package upgrades (Rector)

    Regular, solid, releases bringing updates and fixes

    Arguably one of the best package management systems, Composer. And only one, none of this constantly changing tooling that some other ecosystems seem to do

    Properly open source platforms to power all kinds of web projects from e-commerce, CRM, social, scraping, analytics, monitoring, API, CMS, blogging

    Basically if your target is server side web stuff then it’s really good

    Or, you can continue to demonstrate how out of touch you are by continuing with the old “PHP bad” jokes if you want!

    • @342345@feddit.de
      link
      fedilink
      198 months ago

      Uncached server side rendered response times in double digit milliseconds.

      Thirst thought, that sounds slow. But for the use case of delivering html over the Internet it is fast enough.

    • nicman24
      link
      fedilink
      38 months ago

      not only that but you just install it with the lamp stack setting in ubuntu tasksel with apache and mariadb. the beating that these can take (except maybe the sql) and survive is great. you also have access to the whole of linux to do more advanced stuff, while other languages/ stacks shy away from exec

        • amio
          link
          fedilink
          108 months ago

          Turns out arbitrary code execution is actually great(!)

            • @Slotos@feddit.nl
              link
              fedilink
              18 months ago

              Problem is, you’re mixing a number of different concepts into a nonsensical claim.

              Exec as an “execute a string as a language instructions” is nothing new nor unique to PHP. Ruby on Rails, for example, uses it in a controlled manner to generate methods on ActiveRecord models.

              Exec as an “replace this process with another process” is old news again. It’s not even language specific.

              Popen/spawn family (which seems to be what you alluded to) is, once again, nothing new and is used everywhere.

              • nicman24
                link
                fedilink
                -18 months ago

                i just meant that python’s and node’s implementation is shit

      • @TheBeege@lemmy.world
        link
        fedilink
        3
        edit-2
        8 months ago

        All of that can be the same as other stacks except the Apache bit. You can stand up a Go application on Ubuntu hitting MariaDB as its persistence layer. Or Python. Or Node. Or Java. Or even Ruby. Shit, Haskell can do it.

        Also, exec is a code smell. Arbitrary code execution is a massive security risk, and the effort to mitigate that risk is often less than explicitly building out the required functionality.

        I think you need to explore more technologies, my friend. And read up on some security things

        Edit: I now realize you mean exec as in calling out to a shell. All languages have this. Still, the overhead of spawning and managing a new process is often more than just implementing the logic in your application itself.

    • @gkd@lemmy.ml
      link
      fedilink
      18 months ago

      On the note of testing, Pest is still one of the best testing options I’ve seen across a variety of langs.