3 ms·
The problem is your logic is circular and you make generalized claims about how 'most PHP devs' do X. No one here is saying PHP is a "golden hammer" to solve a
by opendais 13y ago
The problem is your logic is circular and you make generalized claims about how 'most PHP devs' do X.
No one here is saying PHP is a "golden hammer" to solve all problems. PHP is a tool for a specific problem domain and it solves problems within that domain effectively with certain cost/benefit characteristics.
> long-running processes
No one here suggested you should be writing PHP daemons.
> threads
Hint: That is what PHP-FPM is for.
> actor systems
Actors are also generally long running processes.
etc.
> Because to PHP developers absolutely any problem fits into "state in MySQL and logic in PHP". Even with Memcache, or now with NoSQL stores like Redis, the mindset remains the same, just the API is different.
Every single CRUD application fits into this particular problem domain. Many PHP developers happen to work on CRUD applications, therefore many PHP developers first attempt to solve a problem in this way.
I've seen a large, well known IT company basically admit they did this [none of them were PHP devs] when they should have been using a very different architecture.
This is not a PHP problem, this is a mindset problem independent of the language used.
- icehawk219 13y ago> No one here suggested you should be writing PHP daemons. I agree with everything you've said and this statement isn't false in the scope of this thread. But I can't count how many times fellow PHP developers have suggested using PHP to write daemons and scripts that would be running on servers for weeks or months (or presumably even years) without restart or how much push back I received when I suggested using something better suited for it. But to your point none were proficient in other languages so it's only natural they'd try to figure out how to do it in the one they knew best.