For FaaS sake: Google adds PHP to Cloud Functions

For FaaS sake: Google adds PHP to Cloud Functions

Internet giant Google has extended its Cloud Functions platform for Functions as a Service (FaaS) with the addition of PHP support.

Google emitted the news on its Application Development blog, stating that Cloud Functions for PHP is now available in Preview status, allowing developers to try out deployment of functions in a fully managed PHP 7.4 environment, complete with access to resources in a private VPC network. PHP functions scale automatically based on your load.

Users can develop functions using the Functions Framework for PHP, an open source functions-as-a-service framework for writing portable PHP functions. With the Functions Framework users are able to develop, test, and run functions locally, and then deploy them to Cloud Functions or to another PHP hosting environment.

According to Google, the Functions Framework for PHP supports both HTTP functions and CloudEvent functions. A HTTP function is described as similar to a Webhook, whereas a CloudEvent function responds to Google services, such as Pub/Sub, Cloud Storage and Firestore, using CNCF CloudEvents.

Google states that its PHP Functions Framework fits comfortably with popular PHP development processes and tools.

Cloud functions on PHP support logging through Cloud Logging, so information and error messages should be logged using Google’s Cloud Client Libraries for the Cloud Logging API or using stderr, which will then be visible in the Logging UI.

Google first announced Cloud Functions as a FaaS platform back in 2016, but it was effectively a beta until 2018. The firm touts it as ideal for creating single-purpose, stand-alone functions that respond to events, without having to manage a server or runtime environment. Google has continued to add new supported languages to the platform, with PHP now joining Node.js, Python, Go, Java, .NET and Ruby.