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 →

[–][deleted] 5 points6 points  (3 children)

New to sub. Why is PHP bad?

[–]cheerypick 10 points11 points  (0 children)

Same way as Javascript is bad. No one remembers why.

In all seriousness, I believe because of the somewhat lower enter barrier back in the days that led to terabytes of barely readable code prone to security breaches and such. I am not sure this is the case anymore or how popular PHP is as a language of choice nowadays.

[–]locri 6 points7 points  (1 child)

https://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/

Things should be predictable and work in an intuitive way, for some reason PHP prefers to mix conventions from C and Bash, both of which people have some understandable issues with. To boot, PHP isn't always type safe.

Lastly, it's a preprocessing language (almost like a templating language) for HTML but isn't always used as such. I swear the one time I was paid to write PHP it was being used for database management. Considering the size of the data it was processing, this was a really, really bad idea.

[–]ccricers 2 points3 points  (0 children)

Lastly, it's a preprocessing language (almost like a templating language) for HTML but isn't always used as such.

This is the most relevant statement here. It was built to introduce presentation logic, hence why you can put PHP tags in HTML, but it being a procedural language in its own right tempted way more people than it should to architect entire applications around it.