Getting Started With Serverless PHP

Click for: original source

Rob Alen short article in which he takes a look at how to build a simple serverless PHP function. He is interested in Apache OpenWhisk and this article focuses on PHP runtime with IBM Bluemix.

OpenWhisk is a serverless environment, you can run it yourself - but most users do not run their own copy and instead use a commercial provider (e.g. IBM’s Bluemix). IBM has added support for PHP to the Bluemix “IBM Cloud Functions” platform, so now we can use PHP to develop serverless applications and deploy them into the wild!

Author then quickly describes how to set up account with Bluemix and how to install wsk (CLI tool). He then provide examples how to write functions (actions) for PHP. The runtime uses PHP version 7.1 - so we get all the new PHP features.

Any OpenWhisk action can be configured as a “Web Action” which provides a public URL without having to worry about configuring API Gateways and what not. In article you also find how to use parameters and metadata. Good read and great news for fans of PHP serverless.

[Read More]

Tags php serverless