3 ms·
However php can be used for background processing if done right - but its speed in processing large amounts of data is dogshit. For instance if you wish to iter
by gumballindie 3y ago
However php can be used for background processing if done right - but its speed in processing large amounts of data is dogshit. For instance if you wish to iterate massive arrays in one go then python is waaay better. If you wish to iterate each one at a time then that can easily be done via queues and can be parallelised endlessly quite easily.
But one common issue with php devs is that they are religious about the language. Probably because they dont actually understand programming as a whole - not even php itself. They should use the best tool for the task at hand and not be religious about php.
I remember when i was in that dark place i even considered php for gui apps lmao because php was hot hot hot.
- trog 3y agoThere is (almost) /always/ a faster language. As with any stack, the advantage of PHP being used for background processing in a PHP application is you're already using it, so you don't end up having to manage multiple codebases. I was involved in several large PHP projects which did a lot of background processing (not Google scale, but telco scale) and performance was more than adequate in all cases. The advantages of running a single codebases far outweighed any potential benefit of a speed increase from switching to another language. (... I say that having been the jerk that actually did rewrite one small component in C and it turned out to be a huge waste of time and effort and just meant something additional the team has had to manage in the almost 20 years since I did it!)
- gumballindie 3y agoWell ok but it seems like the C app you “wasted time” on lasted 20 years. I bet the rest of that stack either moved away from php or added extra languages. But yes, the reluctance to use other languages and different codebases was also a common argument in all php teams i worked with. People need to understand that a language is a tool not a religion. If using php for the web layer, python for processing background tasks and nodejs for apis makes sense then do so by all means. PHP devs need to understand that. The PHP apps i built were for large userbases processing billions of pounds and in one case dollars a year. The language if used right is superb. It’s the type of dev using it that’s usually not, I am sorry to say that.
- trog 3y ago> I bet the rest of that stack either moved away from php or added extra languages. Heh, nah, the rest of the stack is still running. The first line of PHP code that I personally wrote was in 1999 and it's still there; the core CMS was written earlier than that. It's not doing anywhere near the traffic it used to (it was a reasonably popular video gaming site back in the day; it gets almost zero maintenance & I'm continually impressed it's online and working just as well as it did (... arguably better because it has so much less load :) > It’s the type of dev using it that’s usually not, I am sorry to say that. I don't disagree but I also don't think that is a problem unique to PHP at all. Arguably some languages are better than others at keeping developers on the rails in some cases, but you're going to see garbage written in everything eventually.