Enjoyable & powerful 🐘 PHP Runtime (php.now.sh) for ZEIT Now.
🕹 f3l1x.io | 💻 f3l1x | 🐦 @xf3l1x
🏋️♀️ It works with these frameworks and tools. Discover more at examples.
| Pkg | Tag | Stability | Info | |
|---|---|---|---|---|
| ✅ | now-php | latest | production | Rock-solid stable. |
| 🔥 | now-php | canary | testing | For early-adopters. |
| now-php | experimental | development | Testing and high danger. |
Need to know how things are changing? Here is changelog.
- Architecture: PHP development server (🚀 fast enough)
- PHP version: 7.4.4
- Extensions: apcu, bcmath, brotli, bz2, calendar, Core, ctype, curl, date, dom, ds, exif, fileinfo, filter, ftp, gettext, hash, iconv, imap, intl, json, libxml, lua, mbstring, mysqli, mysqlnd, openssl, pcntl, pcre, PDO, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, phalcon, Phar, protobuf, psr, readline, Reflection, runkit7, session, SimpleXML, soap, sockets, sodium, SPL, sqlite3, standard, swoole, timecop, tokenizer, uuid, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zlib
- Speed: cold ~250ms / warm ~5ms
- Memory: ~90mb
- Frameworks: Nette, Symfony, Lumen, Slim, Phalcon
List of all installable extensions is on this page https://blog.remirepo.net/pages/PECL-extensions-RPM-status.
Take a look at ZEIT's blogpost about Serverless Functions.
You should define functions property in now.json and list PHP files directly or using wildcard (*).
{
"functions": {
"api/*.php": {
"runtime": "now-php@0.0.10"
}
}
}If you need to show index page define routes properly.
{
"functions": {
"api/index.php": {
"runtime": "now-php@0.0.10"
}
},
"routes": [
{ "src": "/(.*)", "dest": "/api/index.php" }
]
}Additional function properties are memory, maxDuration.
{
"functions": {
"api/*.php": {
"runtime": "now-php@0.0.10",
"memory": 3008,
"maxDuration": 500
}
}
}Click & Go
For running now dev properly, you need to have PHP installed on your computer, learn more.
- official - https://php.now.sh/
- phpinfo - https://php.jfx.cz/
- extensions - https://php.jfx.cz/ext/
- ini - https://php.jfx.cz/ini/
- JSON API - https://php.jfx.cz/api/users.php
- test - https://php.jfx.cz/test.php
- PHP - fast & simple
- Composer - install dependencies
- Framework - Lumen
- Framework - Nette
- Framework - Slim
- Framework - Symfony - Microservice
- Framework - Phalcon
Browse more examples. 👀
- 2019/10/23 - Code Examples
- 2019/10/19 - ZEIT - Deploy Serverless Microservices Right Now
- 2019/08/23 - Code Examples
- 2019/07/07 - Bleeding Edge PHP on ZEIT Now
- 2019/06/06 - Code Examples
- 2019/06/05 - ZEIT - Deploy Serverless Microservices Right Now (VIDEO)
- next-gen PHP runtime ✅
- Composer
- config.composer: true ✅
- composer.json detection ✅
- zero config ✅
now dev✅- rewrite to typescript ✅
- setup CI ✅
- configure php.ini 🚧
- using
builds.config✅ - using
build.env🚧
- using
- PHP versions
- 7.4 ✅ (used)
- 7.3 ✅
- 7.2 ✅
Help wanted
- create many examples (majority frameworks and other use-cases)
Show me CHANGELOG





