Hacker News new | ask | show | jobs
by stronglikedan 968 days ago
Perhaps we're finally at a point on HN where people realize there's no need to question the use of PHP. it's a robust, capable language that's just as, or more, suitable for the majority of use cases as any other language.
2 comments

I think most of that was coming from the (then) next generation JS crowd who was trying to fit everything into one neat little box. They've since burnt themselves out and found the limitations in their approach during the process.
I’m the usual suspect for shi^W questioning php and I think you are wrong about demographics.
Just a perspective:

PHP 7+ (the language) was wonderful, especially compared to Javascript's woefully inadequate standard library. It had so many helper functions that made even working with JSON and big data objects much easier.

But having to manage its buildchain wasn't fun (meaning needing to containerize a web server, PHP-FPM, etc. for every trivial deployment). Then needing to support an OS behind it with updates and such, even Dockerized.

For serverless in particular, the availability of V8 isolates (like in CF Workers) or other "just run this snippet of code and don't bother me about the infra" services (like Lambda) or "I can host my serverless in a file alongside my other frontend stuff" (like on Vercel/Netlify) means that JS functions are pretty much zero-config 1-click deploys.

Is there anything like that in the PHP world? For Bref, for example, you have to set up a lot of stuff before the serverless will run: https://bref.sh/docs/setup

For Google Cloud Run (which supports auto-scaling containerized PHP, not true serverless but closer to it than a full VM), you have to manage docker: https://cloud.google.com/run/docs/quickstarts/build-and-depl...

Maybe the closest one I know of is a Google Cloud Function (https://cloud.google.com/functions/docs/create-deploy-http-p...) which comes close to the "function as a service" of JS serverless, but you still at a minimum have to deal with a tiny folder structure (index.php + composer.json).

Is there anything similar on AWS or elsewhere?

your container running the web server and php-fpm should only need to be deployed once. the point of PHP is that to update your code you just... replace the file. this sounds like a poorly designed CI pipeline that is of no fault of PHP.
What? There was no CI involved. It's more a matter of being able to spin up separate environments for different teams, projects, or especially clients. Both for security and billing and resource allocation etc.