re: Why some people hate PHP? VIEW POST


You got two categories of PHP “haters” :

  • Those who are not pragmatic. You often recognise them by their habit of thinking of the solution before understanding the problem to solve
  • Those who are pragmatic. You often recognise them by their down to earth approach at solving problems while still thinking of the long term game

I like to think that I am part of the pragmatic group, which only is my opinion really.
Exactly like a lot of ideas that people say about programming languages, for example :

  • language is just a matter of syntax
  • all languages are just tool to solve a problem, they have no value in themselves
  • all languages have defaults so they all are the same
  • choose the right tool for the right job

As you guess, I do not agree on those points, however I have no formal proof so I often make the point about assemblers and how if we had not evolve those, we would be still required to know and handle whole new categories of issues while writing a form … but not today, at least not in depth.

If somebody wants to use PHP to write code. Fine by me. In truth as long as I don’t work on it or that I was not ask about my opinion, it is not my problem. Perfectly useful software have been done and are being made in PHP, so It works. What bother me about PHP, is its cost.

I used to code PHP, so I have experienced that the fast workflow, the stateless request/response model built on HTTP, the great community, the very well built Web Frameworks that exist.
I have not experienced first hand but I followed efforts made by Facebook and PHP7 to greatly improved the ecosystem.

I talk about ecosystem because languages are useful also because of it, talking or using about languages without including the ecosystem, is not worth the time. This lesson has been learnt, that’s why Go, Rust, Typescript ... have also a strong focus on tooling and communities to speak of some ecosystem aspect.

My PHP « hate » comes from everything you have to KNOW about it, to maintain and evolve a large code base, in short PHP scales badly.
Please avoid talking to me about design patterns and good practices. Those exists in all languages and using them in PHP does not solve my issue in the least. That’s why Facebook who has no choice than to live with PHP, invested so heavily in this (we can agree that they know good practices and design patterns rights ?), that’s why PHP 6 does not exist and PHP 7 offers nothing than Facebook already provided (for the most part).

This was true (to many people, me included) : eev.ee/blog/2012/04/09/php-a-fract... maybe less so today but I seriously doubt it.

This is why, when I finished to figure out what is the problem I have to solve by prototyping in whatever language fits my workflow or whatever method of my choosing and that I have to choose my tech Stack, PHP is never on my list. It cost too much to maintain in the long run.

In short : McDonald fast food is popular. It does the job but in the long run, it will KILL you.

Code of Conduct Report abuse