DEV Community

Discussion on: What is serverless PHP and how does it work?

Collapse
andreidascalu profile image
Andrei Dascalu

Wrong. The only cloud provider that natively supports PHP as of now is Google.
AWS sort of supports a workaround where you can package Docker containers to be triggered as functions.
This works but it's not as fast as a native sercerless runtime as provided by GCP.

Collapse
lito profile image
Lito

AWS support PHP natively: aws.amazon.com/blogs/compute/intro...

Also, support PHP as functions as containers: aws.amazon.com/blogs/compute/build...

Collapse
andreidascalu profile image
Andrei Dascalu

I guess it depends on what do you mean by natively. You need a custom runtime definition to make PHP work with Lambda. It's been the case for a while - in fact ever since AWS introduced custom runtimes (but you need to provide your own_.

That's not the case in GCP. In GCP, PHP is provided as a first-citizen runtime (PHP 7.4 at the moment).

Basically, if you go to their respective consoles, is PHP listed? If no, then it's not "natively supported".

Collapse
carlalexander profile image
Carl Alexander Author

The point I was making with AWS is how much information is out there. GCP might have PHP as a first class citizen. It's still not something you'll find a lot of information about. There's a lot more information out there about using a custom runtime with Lambda than using native PHP with GCP.

Collapse
andreidascalu profile image
Andrei Dascalu

That's also kindof the point. Do you need that much documentation for Lambda? Should you? The whole selling point of sercerless functions is that you have a function and it's executed on a trigger.
The whole idea that you need several pages of documentation to setup something that by definition doesn't need setup (particularly, say for a "hello world") is a but ridiculous.
You don't need pages of documentation to run Node code, do you? In the case of a Python application you might given the vendoring particularities but that's about it.