Live data from Hacker News

An Internet of PHP

timotijhof.net

281–290 of 333 posts

Re: An Internet of PHP

#281

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/

HHVM 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.

This 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.

Re: An Internet of PHP

#282
You almost convinced me to try it again but then i remember about:

* php.ini * php extensions * hardish deploy needing a specially configured web server * huge number of terribly named builtins * functions returning int|bool|null|whoknows * $, -> * cant trivially dockerize * laravel wants me to install even more crap other than Apache phpfpm php composer artisan sail larathis larathat so he can buy the second lambo by copying rails and django * xdebug

And i just go on my merry way. Php devs forgot the mountain of quirk and bullshit they internalized. That’s the same reason I’m starting to hate python

Re: An Internet of PHP

#283

php runs securely in 5minutes in any web server 3-10$/month. Every other tech, it's complicated servers or complicated billing, not to mention depencies and build tools. thats why php

True. I setup a woocommerce site for someone 3 years ago, still makes around $1000 a month (pretty good for a small biz in India) and I just helped them downgrade from a $10 digitalocean VPS to a $3 cpanel hosting.

Classic php ecommmerce customer: miserable cheapskate that thinks saving 80 dollars a year is great, had my fair share of these

Re: An Internet of PHP

#284

Earlier quoted context omitted.

That's a good point, I imagine doing that would screen out companies run by language snobs. My go to for this is to say "I don't think Typescript is needed most of the time". The snobs look at you like you just farted in their face. But having done some coding interviews where time and space complexity were a factor, I found it easier to succeed with Python.

> "I don't think Typescript is needed most of the time This is a terrible example, typescript (especially in 2023) is basically free with most setups (including vanilla) and easy to ignore for velocity then optionally enforce typechecking later. A much better hill to die on would be large frameworks/tooling like react/angular/webpack.

Exactly. If the interviewer responds like that, they've told me the company culture, and I know to stay away.

Re: An Internet of PHP

#285
post #79

I like PHP, one issue which I face with PHP though is, that it is difficult to create a self-contained docker image. With node.js or java spring boot i can build an application with an http endpoint and create a single docker image with all included easily. With php I need 2 distinct containers, e.g., nginx, php-fpm and the code mounted on a volume to the the containers. So it seems to be more difficult for setup and…

I don't really know what directed you to the nginx+fpm+volumes in the first place. FROM php:7.2-apache COPY src/ /var/www/html/ and this is it.

You want fpm for non hobby projects

Re: An Internet of PHP

#286
post #59

Thank god. Imagine if the whole internet was as fragile as the latest opinionated twitter rockstar programmer with VC's money

Of the brainwashed elixir zealots trying to convince everyone to use phoenix for a 3 users internal dashboard

Fearless concurrency with actor model

Re: An Internet of PHP

#287
post #219

I'm in my 30s and grew up with PHP since the 2000s. There's still an insane amount of money to be made with WordPress plugins, WordPress support, and more. That industry isn't dead, it's thriving, it's insanely cheap to jump into and not get yourself into debt, and there's tons of people that need help. While people here argue about the 10th "correct" way to do server-side rendering (hey, React says we gotta use RSC…

Not just that. I recently checked out Laracon, the Laravel conference. You can find videos on YouTube. But I am yet to find another programming conference that was this high energy, fun and focused on great developer experience.

And because so many people make real money off of it, there is a focus on making practical things. Hackers who are looking at doing their own startup, might want to try out Laravel and it's ecosystem.

Re: An Internet of PHP

#288

You almost convinced me to try it again but then i remember about: * php.ini * php extensions * hardish deploy needing a specially configured web server * huge number of terribly named builtins * functions returning int|bool|null|whoknows * $, -> * cant trivially dockerize * laravel wants me to install even more crap other than Apache phpfpm php composer artisan sail larathis larathat so he can buy the second lambo b…

Can you add some color the bit about it not being trivially dockerized? Might be doing this soonish for work, would love extra info.

Re: An Internet of PHP

#289
post #288

You almost convinced me to try it again but then i remember about: * php.ini * php extensions * hardish deploy needing a specially configured web server * huge number of terribly named builtins * functions returning int|bool|null|whoknows * $, -> * cant trivially dockerize * laravel wants me to install even more crap other than Apache phpfpm php composer artisan sail larathis larathat so he can buy the second lambo b…

Can you add some color the bit about it not being trivially dockerized? Might be doing this soonish for work, would love extra info.

For a Production setup we had to configure an nginx container plus the FPM container, let em talk, Configure some more Commands to enable/disable xdebug (that requires a restart of the containers since it needs a php estension) and i think that’s all. Other langs we use are literally “run the app” then kube will handle the rest.

Re: An Internet of PHP

#290
post #288

Earlier quoted context omitted.

Can you add some color the bit about it not being trivially dockerized? Might be doing this soonish for work, would love extra info.

For a Production setup we had to configure an nginx container plus the FPM container, let em talk, Configure some more Commands to enable/disable xdebug (that requires a restart of the containers since it needs a php estension) and i think that’s all. Other langs we use are literally “run the app” then kube will handle the rest.

Got it, thanks!
Post reply on HN