I don’t know if it’s due to over-exposure to programming memes but I certainly believed that no one was starting new PHP projects in 2023 (or 2020, or 2018, or 2012…). I was under the impression we only still discussed it at all because WordPress is still around.

Would a PHP evangelist like to disabuse me of my notions and make an argument for using PHP for projects such as Kbin in this day and age?

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

    While I haven’t tried symphony, my annoyance with PHP in general is that parsing any kind of data is tacky. In the end you have just as many lines as python but less readable.

    Cleaner functions or cleaner data? Both languages have their strengths and can (now) be typed.

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

      Use the right tool for the job. If you need extensive data parsing and handling, it might be better queuing that off to another service. Even python libraries are usually written in C…

    • l3mming@lemmy.fmhy.ml
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      Well, this is true. It’s all about the right tool for the job. The PHP hammer is good at some things and bad at others. It is good for web development, it is bad for parsing [thanks to its truly awful regex functions], and it is way too bloated to be any kind of scripting language. Python is much better for parsing and transforming data, but its regex implementations are still pretty awful when compared to something like Perl. In fact, I still reach for Perl when I have to parse complex and unstructured text. Haven’t yet reached for Perl 6 though.