📜 ⬆️ ⬇️

PHP sucks! But I love him!

Just yesterday I read a very interesting PHP post : a fractal of bad design (Russian version on Habré - approx. Transl. ). This controversial and provocative topic is widely discussed by the entire PHP community. To be honest, there are both really good positions and remarks, as well as frank errors that do not allow to see the whole picture.


Minor bugs


There are a lot of mistakes in the post and in general the author confuses God's gift with scrambled eggs. Let me highlight the main ones:

In general, out of all the big post, there are few points that can really cause discontent. It says quite a lot, but with such a pompous style it is not very pleasant reading.

My opinion


')
In fact, I agree with most of the writing. PHP is inconsistent. Verbose. There really are examples of inappropriate behavior. He has a lot of problems. Sometimes he is ugly. Sometimes he is clumsy in everyday life. Much leaves much to be desired.

But at the same time, it is unusually powerful. It is easy and simple to write a working application. Really easy to create a large-scale project. Easy to expand. And what is really simple is to get help (on the Internet you will be supported by one of the largest and most active programmer communities).

However, there is one thing that does not add to the popularity of the language: the ability to use non-developers. Just take a look around at open-source web projects and you will understand that PHP is a victory. I mean this whole CMS market, in which competitors for PHP simply won’t get a gun shot (Wordpress, Joomla !, Drupal, vBulletin, MODx, TYPO, etc.). Look at any network services market, and PHP will dominate there (or just have the strongest influence). The thing is, deploying a PHP site is ridiculously easy. So simple that even non-developers can do it.

As Brandon Savage says: It's About The Customer . And this is the big piece of cake that was missed in the original post. In fact, from the point of view of a PHP developer, something is missing. But since when does the developer determine what is successful? If the developer had determined this, then software like Wordpress, jQuery and Jenkins / Hudson would not have achieved such success (for their source codes are under a characteristic quality issue). But they achieved it because they solve the problem and solve it well.

The thing is, PHP has many advantages over other languages. Here's just what came up in my head:


These 4 reasons are enough for me to consider PHP as my main language. I know and actively use Python and server-side JS (node.js at the moment), and I am familiar with several other languages. But I still stick to it and will stick to PHP for my core projects, because although it’s not perfect, it works ...

And your thoughts?

Source: https://habr.com/ru/post/142195/


All Articles