You should use PHP.
I really like PHP. Sometimes, people get confused by that because PHP has a really bad reputation in some spaces. Honestly? I think that's entirely underserved.
Now, lemme explain: First up. Most people that think php sucks think this because their php code sucks. They inherit legacy codebases cobbled together by people with little idea how to write decent php code, they have a terrible experience maintaining them, and then that taints their view of the language. This is php's biggest weakness, but also it's greatest strength:
It let's you write absolutely terrible, horrendous near indecipherable reflection laden messes and never complains.
It is as unopiniated as a language could be. It gets out of your way and just lets you do what you need to. This is great if you know how to write good php, but can lead to horrible, awful codebases if you don't know how to write decent php. It also has a very low barrier to entry due to being easy to pick up, so that leads to it being the first backend language for a lot of people. How that might affect code quality, you can probably imagine.
Now, let me elaborate what I mean when I say that PHP gets out of your way:
PHP was first invented by Rasmus Leerdorf as a collection of tools used to help make his personal homepage a bit more interactive. This is what makes it unique from every other popular programming language out there - It didn't start out as one. Rasmus never had the intention of making a programming language. He never wanted to make one. You may think this is a recipe for disaster. Honestly - I would agree. It was. Early php was not good. But, it was good enough to solve Ramus's problem, so he was happy. And then he shared it with the web, and a bunch of people there also quite liked it, and they were happy. And he and the growing php community kept adding features, and working on it, and using it to make stuff. And that's why PHP is so uniquely great: It was always a tool first and a language second. Here's a quote from rasmus about that which sums it up really well, in my opinion:
"PHP wasn’t written because I wanted to write a language. It was to solve a problem. No one had come up with the right tools yet. Honestly, I am passionate about solving problems — I don’t like programming. It’s tedious. I’m an engineer who will use whatever tools I have [and] if I don’t have a tool, I’ll make a new one."1.
PHP isn't fancy, it isn't the technology of the week... but it's useful. It's boring, it solves problems, and it will probably be around until the heat death of the universe.
Because PHP makes web programming easy. It is the only popular backend language that was actually made for the web. You can use it for templating. You can store session data by just accessing a global variable. Same thing for cookies. Or accessing form data. It has a built in method for hashing passwords. Or reading excel files (yes, really). And a ton of other stuff you might want to do. Every JavaScript, Rust or Go project probably depends on a 100 to 200 packages that do things that PHP just gives you for free, built in. It makes interacting with the web platform really easy and hassle-free, because that is the point of php. It was made for that singular purpose. You don't need additional libraries or frameworks, it just does the thing.
Download a copy of php, and in a lot of cases, you can absolutely get by without ever needing any other depencies for anything. That not only makes it easy to build stuff fast, it also makes it secure. You avoid any leftpad shenanigans by simply not having any dependencies besides php - which is a popular, important open source project used by a lot of the web. 70% of sites use PHP. That's a lot of eyeballs, and a lot of really big companies with tons of funding making sure that there's no big vulnerabilities. There's no situation where your whole project can get sabotaged if one dude maintaining a package you didn't even know you had installed decides that pushing malware to prod would be really funny, actually.
Every other backend language pretty much requires you install some sort of third party package to get started - which usually installs 200 other packages it depends on. That's a tradeoff you should at least be aware that you're making when you're choosing another backend language over php.
Also, it has a built-in type system now. So, y'know. Already better than backend JavaScript.
And yes, there's jank. Oh god there absolutely is. But 99% of the time, you won't come across that stuff unless you go looking for it. And, I can forgive it honestly. All of those design decisions, no matter how weird or stupid they might seem, were made to solve an actual problem someone had. With a large project like php that has been for around as long as php has been, it's inevitable. And honestly, while some of it is extremely weird, i think the extent of it is often overplayed. Every language has it's weird quirks.
And... I have to admit, I do really like some of the jank. It shows php wasn't designed by committee, or a big company or whatever. It was made by people, and sometimes people are just kinda weird.
Oh, and just to clear up a misconception that some people have: it has all the important features you'd want from a modern language.
We have classes, enums, all that good stuff. There was a point in time where php lacked some language constructs that most other languages have, but that hasn't been the case for a couple years now.
Anyways, go use php. It's awesome.
https://venturebeat.com/business/why-the-father-of-php-doesnt-like-programming/↩