Google is bringing support for PHP, a popular general-purpose programming language, to Cloud Functions. With the Functions Framework for PHP, you can write idiomatic PHP functions to build business-critical applications and integration layers. By Brent Shaffer and Vinod Ramachandran @googlecloud.
Cloud Functions is a great fit for serverless, application, mobile or IoT backends, real-time data processing systems, video, image and sentiment analysis, and even things like chatbots and virtual assistants.
The Functions Framework for PHP supports HTTP functions and CloudEvent functions. A HTTP function is similar to a Webhook, whereas a CloudEvent function responds to Google services, such as Pub/Sub, Cloud Storage and Firestore, using CNCF CloudEvents.
Cloud functions on PHP supports logging through Cloud Logging, so information and error messages should be logged using Cloud Logging client library or using stderr, which will then be visible in the Logging UI.
The PHP Functions Framework fits comfortably with popular PHP development processes and tools. Include a composer.json file in your deployment, and those packages will be installed and the autoloader will be registered. Include a php.ini file, and your custom configuration will be loaded and extensions enabled. You will also get links to further reading, functions tutorials and PHP functions framework - and you can contribute as well. Nice one!
[Read More]