DEV Community

Discussion on: Why does PHP get so much hate?

Collapse
 
andreidascalu profile image
Andrei Dascalu
  1. You can use php-pm. Like I also mentioned, there's also Roadrunner (slightly better performing than php-pm). PHP-PM has the advantage of working reliably with more PHP versions, but the thing is, PHP is great in newer versions. I'm not bashing on PHP for that, it's a moot point to argue with someone who's seen php 5 code and working with developers who spent years on php 5 and can't bring themselves to 'upgrade' to newer versions and worse -> perpetuate old coding ways.
  2. Sure, Swoole is great, but again, it's one of the modern tools. I really dare you to bring Swoole to Wordpress though.

Well, yeah, but it's only with PHP that you see so much legacy still in production. The only other language with the same weight is Java. It's no to say, for example, that you can't find applications in that are legacy and running, but the special case of PHP is that literally ALL CMS in PHP have their bulk of code written legacy-style. And then people use them to start new applications today and the developers working on them won't be exposed to good practices.

Thread Thread
 
yellow1912 profile image
yellow1912 • Edited

There are modern cms out there, problem is that they don't have enough usage, plugins, and integrations to beat WordPress. That and the fact is that most WordPress users do not care about what's under the hood.

It's kinda unfair to blame the incompetence of the CMS on the language itself though. I think PHP has longer history than some languages and thus have more apps with legacy code. When you have millions of business depend on you, you cannot make radical decision to break things left and right.

Thread Thread
 
andreidascalu profile image
Andrei Dascalu

exactly, so you have an environment the promotes legacy and bad practices. Also, while Wordpress "users" don't care what's under the hood (users or customers never do), Wordpress developers (as in developers customising WP for use cases) also don't (not really). But they have contact in the sense that sooner or later you use hooks, you need to debug - and the code that you see models the code you write. And then the code you write then becomes part of your style. And then, at some point, you come into contact with people who write modern code and .... that builds the reputation of the language.

Thread Thread
 
yellow1912 profile image
yellow1912

Right, I do agree. I have another perspective though, perhaps unique to my situation: when a client contacts you and asks you to do something related to .net or java, they know they must pay big bucks. On the other hand, clients for PHP work normally have a much lower budget, they always look for quick, and cheap gigs. That comes back to bite them in the future though because you cannot have great developers putting a huge amount of care into the project. You end up with quick hacks that are full of holes.

Also despite all it's faults, I find it very difficult to convince a client to try out any other solution. Even knowing all its shortcomings, the clients always want to use something that is popular or recommended by their marketing guy, or that they are familiar with.

I'm not blaming anyone for this of course (perhaps it's everyone's fault?). It's just an observation.