5 ms·
I like PHP, because it has a familiar C-like syntax and great tooling, like composer, and frameworks, like Symfony. The language has warts, but it's improving.
by okeuro49 3y ago
I like PHP, because it has a familiar C-like syntax and great tooling, like composer, and frameworks, like Symfony. The language has warts, but it's improving.
I think its strength is its architecture, namely shared-nothing state and concurrency at the web-request level. [1]
[1] https://slack.engineering/taking-php-seriously/ https://slack.engineering/taking-php-seriously/
- jtjoadfs223 3y agoHHVM is evidence of the weakness of PHP and is a bandaid hack, but the article spins this as justification for PHP. What would you do if HHVM didn't even exist? Admittedly PHP has had recent performance gains, but by no means would it ever be a first choice in any backend service architecture.
- okeuro49 3y ago> What would you do if HHVM didn't even exist? If you're referring to the Slack article, it is a bit out of date. PHP has since added stronger typing and better performance. I don't think using HHVM is very popular.
- otterley 3y agoThis is a pretty silly take. It's like saying that performance improvements in the Java runtime and advanced garbage collectors like G1GC and ZGC are evidence of the weakness of Java. > Admittedly PHP has had recent performance gains, but by no means would it ever be a first choice in any backend service architecture. Other than at Yahoo, Facebook, ... Don't get me wrong; PHP has issues. But it's very mature; it's fast; it's easy to learn; it has a very diverse and rich ecosystem; it's easy to debug; and in general, it's very useful for building reasonably efficient and performant scalable web services.
- gregjor 3y agoYou either got hit by an avalanche of bad information or prefer to remain ignorant. What would any of us do if some innovation never happened? How does Facebook committing heavily to PHP and then giving back in the form of performance enhancements somehow tar PHP as crap? What language or framework with any longevity didn't have something like that happen? Is Javascript crap if not for Typescript, or V8? You may not make PHP your first choice but plenty of businesses and developers do. If you can point to some actual reasons no one should choose PHP, or widespread failures due solely to flaws in PHP, go ahead.
- finder83 3y agoMaybe I'm missing something, but I disagree with the tooling comment. Composer is horrendously slow, taking on the order of multiple minutes just to do a update often times. This is just my experience, but I'd much rather take mix, cargo, or yarn any day. xdebug, while it works, also feels antiquated. Trying to get it working in a new system or project can take quite a while. Again, compared to python or node's debugging experience or profiling experience, and it feels like something stuck out of the 90s. Even just getting output from php is difficult for me. Maybe it's because of the webserver I'm using? But python, elixir, node, go, etc, all output logs to stdout while running a local service. Maybe that'd work with the built in webserver, but fpm or modphp, etc, it seems like you have to hunt down logs. Not to mention that the dev servers almost always require a full apache or nginx setup just to function. Opposed to a node, elixir, python, or go server which all run directly from the directory you're in. (Including things like hot/auto reloading in node and elixir) I'm not a full time php dev, but my time in php always feels like a grind, and just getting tooling working is not an easy thing. If I'm missing some state of the art alternatives, I'd love to hear them though.