People who say PHP is shit haven't really used it and are just repeating the memes. It's a perfectly fine language and there are a number of excellent tools and frameworks for it. It's reputation is a result of it's easy entry and widespread use. A whole lot of people who knew just enough to be dangerous made a whole lot of stuff, and it ended up causing a whole lot of problems. But for some reason devs shit on the language instead of shitting on the devs who put them in a mess.
It's hard to justify using anything other than JS or if you wanna be fancy, Web Assbly, for the FE.
Any other front end language involves generating Javascript from your language, which inevitably ends up with you making a weird Frankenstein project that mixes the two.
I'd rather just use stuff like Webpack or Vite to compile my JS front-end out of JS (or TS) from the start. It always ends up being a cleaner result.
My backend though can be whatever the fuck I want it to be.
But if you ever think dynamically compiling/transpiling a JS front end on the fly on demand is a good idea, instead of simply just delivering static pre-compiled/transpiled pages, you're part of the problem for why the web is so slow and bloated.
It's wild how crazy of projects people will build that take 3 entire seconds to just deliver a 500kb static form that doesn't even need angular to do anything. They turn a couple hundred kb into several mb for no useful reason, it's wild.
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!
Were people saying PHP was dead in 1995, the year it was released? I guess maybe?
But who was suggesting abandoning PHP for Django in 2003, two years before the latter was publicly released? I suppose the person who made this must've read that Django development started in 2003 and gone with that; most of these years correspond with when the respective project started.
So, the reason Perl (which remained more popular for web development than PHP or any of these things into the early 2000s) isn't on the list must be because it actually predates PHP.
This was nearly a decade ago. I worked at a small app company (5-10 developers) for a bit that used Ruby on Rails for our product. The product was in active development, but was available to customers so it was “done”. We were hiring a senior level dev to oversee the team and we interviewed this guy (maybe in his 40s?, a but older than most people in tech) and he said his first order of business if hired would be to refactor the entire code base to php. I don’t think he was joking. I’m not sure why he interviewed.
I'm sure there are a lot of reasons why PHP is better than Python for the backend, but I created an app wirh Symfony 5 and then an app with Django 4.
Symfony is so weird compared to Django. With Django I can just sit down and get things done. Symfony always seems to have some quirks which are mostly due to PHP (and me not knowing how to program in PHP).
That said, PHP hosting is so much easier and cheaper, this probably is important for smaller projects.
On the server-side PHP is used by 76.8% of all websites (a large chunk of that being WordPress). It is not going anywhere, soon. Looking at this statistics, nothing else seems to be even in the same league from a pure usage point of view.
I have yet to see a reason why it should change. Serious question: What is the disadvantage of using the tried and tested PHP8 compared to the alternatives, if you already know PHP?
django and flask are python btw and people wanted to learn python or perl from like 15 years ago, the popularity of python 2 and its "Issues" led to robust dev on python 3, not to mention it being a default for many linux distros since a long time ago
The PHP I've once used is probably not even remotely close to the PHP people use today. The issue is, once you lose the trust and confidence, it's hard to gain it back. All the people who consistently shit on PHP have also probably not tried it in a very considerable amount of time
Not sure if it was the first, but PHP still beats a lot of other "platforms/framework" because thats what some of these items on the list are in terms of ease of embedding code directly into what you see what you get frontend code (HTML). It inserts backend code into HTML like javascript and that was very convenient and easy to learn, still easier than figuring out some of these platforms different templating shortcodes, that and its constant development and community support. I used to live on the PHP docs comments.... it was a great community.
Honestly, despite my experience in standalone programming and algorithms, my experience in web development is limited. I've had experience with ASP dot NET, Actix (Rust framework Lemmy is powered by) with Diesel ORM, and PHP. ASP is limited in .NET ecosystem, and the primary IDE to develop ASP dot NET apps is proprietary, not something I want to work with. Actix is doing pretty good, it uses Tokio internally, one of the fastest and most robust async frameworks in the wild. I've been using Rust for more than 2 years, and I'd be honest: it was designed for medium- and large-scale application development. For making prototypes, you probably want another programming language. And I see PHP as one of the easiest ways to prototype.
For Django, I've never used it, maybe I'll have to use someday. Nevertheless, I see Python as a rather bloated (in terms of overlapping language features) language which suffers from similar problems as PHP, like no type checking (by default). Also, Python packages are tied to some exact version of Python, which causes a large dependency mess when using multiple packages (Rust also has this problem, but at much smaller scale, and developers of packages often use conditional compiling of language features). Meanwhile, I think that some Python problems could be resolved using a package manifest file, like Rust does.
If you have something to add, go on, because I'm always thinking what server language/framework I should use for my Next Big ProjectTM.
PHP is a shit language, but far from dead. There are too many legacy killer apps that are used A LOT and won't be rewritten in a different language anytime soon. E.g. Wordpress, Mediawiki (The engine behind wikipedia and other wikis), Nextcloud, Typo3, ...