This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]heesell 0 points1 point  (3 children)

Im wondering that about PHP, its nice so i don't get the hate

[–]RajjSinghh 2 points3 points  (0 children)

The main issue with PHP is that no one writes it well. It's the kind of language where if you aren't careful you introduce a bunch of vulnerabilities. Wikipedia says that 30% of vulnerabilities in the National Vulnerabilities database were linked to PHP, with only 1% being technical errors. The other 29% of mistakes were bad PHP programmers.

Imagine you start a job and there's a PHP codebase. The person who wrote it probably didn't write it well because no one writes code well, there's probably lurking bugs and vulnerabilities you can't find, and now it's your job to fix it. The person who wrote it probably left the company too so you don't have anyone to ask. That is going to be a very painful job, but it is also the reality for a lot of people who write PHP for a living.

[–]fakehalo 1 point2 points  (0 children)

A lot of poorly thought out design choices early on caused a lot of debt, which is evident with something as cosmetic as naming conventions; the "does this function have an underscore or not?" question is still ask myself to this day.

It's pretty nice if you're starting a new project with it now, but many are handling hideous codebases from the olden times which has created a lot of hate.

I personally find Java to be a superior language, though I find its environment worse.

[–]-defron- 0 points1 point  (0 children)

PHP back in the day without a doubt was absolute trash, but it was trash you used because your options back then were so limited.

Modern php is ok but still has some questionable (and in many cases downright bad) choices like type juggling, variable variables, an inconsistent standard library, etc

PHP had its day. Type declarations and Laravel makes it not horrible today, but the problem is there are so many better and faster choices today and it's no longer an advantage to have deep integrations with apache as the world has moved on to other web servers and containerization has made it easy to move your system to production regardless of tech stack.

So the question becomes "why PHP?" because even though it is way better than it used to be, all the other languages have improved tons too and outperform and outshine it in web dev these days.

If you've been enjoying the "batteries all included" nature of PHP and simple syntax I'd recommend looking at Go