4 ms·
What is PHP good for these days? What does it do better as a metric than any other language? It's easy to use, easy to get into for beginners, and is a require
by p_ing 2y ago
What is PHP good for these days? What does it do better as a metric than any other language?
It's easy to use, easy to get into for beginners, and is a requirement for WordPress. But performance? Flexibility? Some other random metric-word?
- kgeist 2y agoFor me, 2 main advantages PHP has, for real production code, are: 1) Easy hotfixing/debugging on production servers. Just edit a file and save. Our teams which program in PHP solve blockers way faster than the Go teams. 2) "Shared nothing" architecture, which has two advantages: a) it's scalable without additional effort, because PHP processes are stateless b) better security, especially if you're doing multitenant SaaS, because all requests are isolated from each other (there was a bug in ChatGPT when you could view chats of other users because requests from different users were served by the same OS process in Python and they had a race condition bug when switching between users inside the same OS process - such bugs are very rare in PHP) Not saying it's unique to PHP, but these 2 advantages for real production code are often overlooked; people instead focus on non-essential minutiae like "inconsistent function name, I'd name it differently tbh"
- IshKebab 2y agoYou can trivially do 2. in any language, although it is true that people rarely do that in other languages because of the downsides. As for live editing production... I dunno if that is a good thing!
- AdrianB1 2y agoFor me: I can quickly build a small thing and run it directly. It is interpreted, no build/CI/CD/whatever. It's not just a more powerful PowerShell, but also something that I can use to build a web page with a data source, Datatables.js and ... 30 minutes later it's good to go. For my company: minor apps with laxe requirements, hotfixes usually involve editing a single file, in place, then push to Git. We don't have "serious" apps in PHP, but we have a few low tier apps using it, it's simple and convenient.