DEV Community

Milan Felix Šulc for NetrixOne

Posted on • Updated on

Bleeding Edge PHP on ZEIT Now

Today I would like to show you ZEIT Now platform. Well, you've probably heard about it. There are many blogposts about this awesome piece of technology (https://dev.to/search?q=zeit%20now).

But, I have some good news for PHP devs. Since June (06/2019) I am working on the enhanced PHP builders for ZEIT Now.

These builders support:

  • multiple PHP versions (7.2.20, 7.3.7, 7.4.0alpha2) 🚀
    • official PHP builder is 7.1.22
  • multiple running modes (server, cgi, cli, fpm) 🧙‍♂️
    • just pick whatever you like
  • many preinstalled PHP extensions 📦
  • install dependencies via Composer 🤩

The updated builders you can find at the Github juicyfx/now-php and I would appreciate any feedback.

How to test it? Take a look at examples


How to deploy under 1 minute? Create index.php and now.json in your project's folder. If you're not familiar with ZEIT Now, take a look at official website.

<?php 

phpinfo();
{
    "version": 2,
    "builds": [
      { "src": "old.php", "use": "@now/php" },
      { "src": "new.php", "use": "now-php" }
    ]
}

Yep, that's all. And now call now. 🤓

You should saw something like that.


At the end, some examples.

I'm also testing Caddy server with FPM and Bref.sh. There are many features you might be looking for.


PHP builder was separated from zeit/now-builders to solo repository - https://github.com/juicyfx/now-php. Take a look.


Happy testing,
Felix

Top comments (2)

Collapse
 
johnnypea profile image
Ján Bočínec

Are there any real advantages using "now-bref" instead of "now-php"? Thanks.

Collapse
 
f3l1x profile image
Milan Felix Šulc

Well, currently on. now-bref is still experimental implementation.