0.0.1-canary.1 β’ Published 5 years ago
@now-bref/lib v0.0.1-canary.1
π£ Versions
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.
π€ Features
- Architecture: PHP development server (π fast enough)
- PHP version: 7.3.8
- Extensions: apcu, bcmath, bz2, calendar, Core, ctype, curl, date, dom, ds, exif, fileinfo, filter, ftp, gettext, hash, iconv, json, libxml, mbstring, mysqli, mysqlnd, openssl, pcntl, pcre, PDO, pdo_mysql, pdo_pgsql, pdo_sqlite, phalcon, Phar, readline, Reflection, session, SimpleXML, soap, sockets, sodium, SPL, sqlite3, ssh2, standard, swoole, tokenizer, 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.
βοΈ Usage
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.7"
}
}
}
If you need to show index page define routes
properly.
{
"functions": {
"api/index.php": {
"runtime": "now-php@0.0.7"
}
},
"routes": [
{ "src": "/(.*)", "dest": "/api/index.php" }
]
}
Additional function properties are memory
, maxDuration
.
{
"functions": {
"api/*.php": {
"runtime": "now-php@0.0.7",
"memory": 3008,
"maxDuration": 500
}
}
}
π¨βπ»now dev
For running now dev
properly, you need to have PHP installed on your computer, learn more.
π Demo
- phpinfo - https://now-php-server.juicyfx1.now.sh
- extensions - https://now-php-server.juicyfx1.now.sh/ext/
- ini - https://now-php-server.juicyfx1.now.sh/ini/
- test - https://now-php-server.juicyfx1.now.sh/test.php
π―Examples
- Composer - install dependencies
- Framework - Lumen
- Framework - Nette
- Framework - Slim
- Framework - Symfony - Microservice
- Framework - Phalcon
- PHP - common stuff
- Serverless Functions
Browse more examples. π
π Resources
- 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)
π§ Roadmap
- 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
Help wanted
- create many examples (majority frameworks and other use-cases)
- cover by tests
- adopt PHP 7.4
π¨π»βπ»CHANGELOG
Show me CHANGELOG
π License
0.0.1-canary.14
5 years ago
0.0.1-canary.13
5 years ago
0.0.1-canary.12
5 years ago
0.0.1-canary.11
5 years ago
0.0.1-canary.10
5 years ago
0.0.1-canary.9
5 years ago
0.0.1-canary.8
5 years ago
0.0.1-canary.7
5 years ago
0.0.1-canary.6
5 years ago
0.0.1-canary.5
5 years ago
0.0.1-canary.4
5 years ago
0.0.1-canary.3
5 years ago
0.0.1-canary.2
5 years ago
0.0.1-canary.1
5 years ago