• lankybiker@lemmy.world
    link
    fedilink
    arrow-up
    70
    arrow-down
    6
    ·
    11 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
      arrow-up
      22
      arrow-down
      2
      ·
      11 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.

        • aksdb@feddit.de
          link
          fedilink
          arrow-up
          4
          ·
          11 months ago

          For a bit of templating? Yes! What drives response times up is typically the database or some RPC, both of which are out of control of PHP, so I assume these were not factored in (because PHP can’t win anything there in a comparison).

          • naught@sh.itjust.works
            link
            fedilink
            arrow-up
            4
            ·
            11 months ago

            Anything under like 100ms load is instant to the user, especially a page load. It’s a balancing act of developer experience vs performance. To split hairs over milliseconds seems inconsequential to me. I mean, PHP requires $ before variables! That’s the real controversy :p

            • aksdb@feddit.de
              link
              fedilink
              arrow-up
              4
              ·
              11 months ago

              Anything under like 100ms load is instant to the user, especially a page load.

              True, but it accumulates. Every ms I save on templating I can “waste” on I/O, DB, upstream service calls, etc.

          • jaybone@lemmy.world
            link
            fedilink
            arrow-up
            1
            arrow-down
            2
            ·
            11 months ago

            If it’s stateless and nothing is kept in memory, can you have a connection pool?

            • aksdb@feddit.de
              link
              fedilink
              arrow-up
              1
              arrow-down
              1
              ·
              11 months ago

              If you run it in old-school CGI mode, no, because each request would spawn a new process. But that’s nowhere near state-of-the-art. So typically you would still have a long-running process somewhere that could manage a connection pool. No idea if it does, though. Can’t imagine that it wouldn’t, however, since PHP would be slaughtered in benchmarks if there was no way to keep connections (or pools) open across requests.

    • gkd@lemmy.ml
      link
      fedilink
      arrow-up
      1
      ·
      11 months ago

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