DEV Community

Discussion on: What's the deal with downing PHP development?

essiccf37 profile image
essic • Edited

I would like to start by saying that people love to hate. To me it’s almost a fact, anything
widely use by people will be criticized, always has been always will be. So even though I’d like to think myself different, there might be a little bit of that in my “hate” of PHP. In truth as long as I’m not forced to do PHP, I do not care what people code with. There are far worst issue existing in our industry today like the lack of professionalism or security concerns in project today…

I try to be short about why I’m downing PHP.

First : everything written here was true at the time and nothing of significance happens that change the core issue that this article presents : PHP is badly designed. This has the effect that you have to possess deep knowledge of PHP to build solid and maintainable solutions. Not knowing those quirks will put your project in some sort of issues at some point.

Second : there are better options everywhere .NET platform, Java platform or even Node (which I also dislike) just to talk about major one. Now that one is a bit tricky to explains but I’ll give it a go.
PHP has the cheapest cost of hosting that I know, also you do not require a dedicated host to make it run efficiently, to a lot of business out there, this matters most. I understand and respect that, I just also remember that businesses also loved IE6 meaning business is king, it’s not always working in its best interest …
So when I say “better”, I am talking about the famous “cost/benefits” ratio from a technical and business point of view and here what I mean to say : there are no more benefits to PHP than its hosting cost for making websites comparing to its concurrents. On any other aspect, every major web platform does what PHP does while the reverse is often false. What’s worst is that while PHP specialize in web development, it never has the best solution.
I am not even going to talk about distributed applications or web services since parallel processing, concurrency or asynchronism are just not what PHP does (no need to go further for me).

Third : PHP 6 never got out and nothing on PHP 7 makes HHVM and Hack obsolete in fact, I often wonder why PHP 7 at all ?? Many reasons for PHP 6 failure, some technical other not but assure you it was not the skills of the people involved those people are seriously good developers.
What matters to me, though is : that there was technical reasons. Check them out...

Fourth : PHP does not scale and no amount of good practices can change that. Try writing a website in assembly with good practices
For that one the Facebook example shows it best I think. They are not happy at all with PHP.

Just to get certain things out of the way :

  • Yes PHP has great qualities: it’s a really productive language, clean state at each request, the perfect fit with the HTTP 1 model … but they are far from enough for large projects, its defaults far outweighed its qualities.
  • Yes for small to medium websites it does not matter if you use PHP or not, but to be able to grow and maintain a codebase, is one of the core part of a developer’s job and PHP as a language does not help you. Which is my point.
  • Yes Javascript on the backend side is not a good idea (at least I think so) but it’s still better than PHP because the tooling is better, Node is fully asynchronous , DevOps is mature for that platform and everything transpiles to JS.
  • Yes PHP 7 makes things better. So what ? PHP 4 and 5 did the same at their times, didn’t change that it’s badly designed then, doesn’t change it now …

All that being said I am against all bogus and dumb statement like « PHP is not a programming languages » or « PHP developers are not real developers ». You can write software in PHP and it works (Wordpress, Slack …) but all platforms are not equivalent, that’s just false IMHO, ** that’s why I’m downing PHP development**

On the better alternative depends what you’re up to ? SPA or not ?