loading...

Discussion on: What’s an unpopular software opinion you have?

Collapse
lietux profile image
Janne "Lietu" Enberg

Really, PHP as a language is so restricting that there are a lot of things you simply cannot and should not code in it. Additionally the whole design for the typical use of the language - a collection scripts that get evaluated from start to end for every web request, triggered by access through a web server - is so bad that it has lead to countless incredibly misguided design decisions and massive numbers of hacks and other issues.

As an example, there's WordPress having all the modules deployed under the public folder and then access to them gets you direct "access" to the code, so all you need to find is one ignorant developer's one bad module and scan the world for all installations of it to hack a big pile of websites. This is the legacy PHP has given us.

Add to that the fact that the language has countless really bad design choices, that simply waste your brain power in useless things - does the function have underscores, does it take haystack before needle, and other such questions constantly waste your time when they could be standardized, and the language community simply refuses to fix their countless past mistakes keeping "backwards compatibility" as some sort of gold standard that must never be sacrificed.

In short: Yes, you can produce code that is better than WordPress in PHP, but you can never be a good programmer while using PHP - you waste too much of your time on things other than producing good code.

Everyone really should read this if they haven't eev.ee/blog/2012/04/09/php-a-fract...