The modern PHP app server https://frankenphp.dev/

Kévin Dunglas efcc33271c ci: run tests with ASAN 4 месяцев назад
.github efcc33271c ci: run tests with ASAN 4 месяцев назад
C-Thread-Pool 3709c2a50b chore: switch to upstream C-Thread-Pool 9 месяцев назад
caddy 469070ce85 chore: prepare release 1.1.5 4 месяцев назад
docs d01733dd3e docs: better Mercure hub schema 4 месяцев назад
internal aa1d968dcf refactor: faster $_SERVER variables creation 10 месяцев назад
testdata b71dae9b03 fix: prevent crash when calling apache_request_headers() in non-HTTP context 6 месяцев назад
.dockerignore 6f108a4203 fix: do not extract embedded app on every execution (#488) 8 месяцев назад
.gitignore 2e72b50d10 ci: add Apple Silicon build script (#313) 10 месяцев назад
.hadolint.yaml c9bf9940d1 ci: add Super-Linter (#323) 9 месяцев назад
.markdown-lint.yaml c9bf9940d1 ci: add Super-Linter (#323) 9 месяцев назад
CONTRIBUTING.md 5cb5d0b8f1 docs: fix typo 5 месяцев назад
Dockerfile 175b9a0296 feat: add Brotli compression support (#524) 7 месяцев назад
LICENSE f8bdd640cf docs: add license (#24) 1 год назад
README.md 6a3db9429d docs: Turkish translation (#654) 6 месяцев назад
alpine.Dockerfile a6fc22505c feat: compress binary in Alpine with UPX 7 месяцев назад
app.tar 537f899939 feat: use tar to embed apps (#333) 9 месяцев назад
app_checksum.txt 6f108a4203 fix: do not extract embedded app on every execution (#488) 8 месяцев назад
build-static.sh 3dbb3fd48d feat(static): add ftp, gettext, gmp, imagick, mbregex, parallel, protobuf, shmop, soap, ssh2, sysmsg, sysvshm, tidy, xlswriter, yaml and zstd extensions (#773) 4 месяцев назад
cgi.go 07a74e5c5a perf: reduce allocs when creating $_SERVER (#540) 6 месяцев назад
dev-alpine.Dockerfile feaa950d89 feat: compile with Go 1.22 (#568) 7 месяцев назад
dev.Dockerfile feaa950d89 feat: compile with Go 1.22 (#568) 7 месяцев назад
docker-bake.hcl f773c1f529 ci: clean Docker tags 4 месяцев назад
embed.go 25a858954c fix: temporary directory name for embed apps 4 месяцев назад
frankenphp.c b18a079eb9 perf: hint the number of threads to TSRM (#655) 6 месяцев назад
frankenphp.go d973206174 fix reading post bodies (#686) 6 месяцев назад
frankenphp.h 07a74e5c5a perf: reduce allocs when creating $_SERVER (#540) 6 месяцев назад
frankenphp.png 625ab8906f docs: update logo 1 год назад
frankenphp.stub.php ea5e19ff4b fix: getallheaders() must return request headers (#772) 4 месяцев назад
frankenphp_arginfo.h ea5e19ff4b fix: getallheaders() must return request headers (#772) 4 месяцев назад
frankenphp_test.go e127cf5e1c update test (#688) 6 месяцев назад
go.mod ea83ea6dbd chore: bump deps 4 месяцев назад
go.sum ea83ea6dbd chore: bump deps 4 месяцев назад
options.go 07a74e5c5a perf: reduce allocs when creating $_SERVER (#540) 6 месяцев назад
recorder_test.go 5012ac30cd chore: improve tests and add missing file (#13) 1 год назад
release.sh 5da805d9ee ci: use Apple Silicon machines when useful (#550) 7 месяцев назад
reload_test.sh 517e086786 fix: random crashes when reloading (#394) 9 месяцев назад
request_options.go 15a600cdaa chore: fix function name in comment 5 месяцев назад
smartpointer.go 5bda50cbd7 Fix memory leak (#442) 8 месяцев назад
static-builder.Dockerfile 3dbb3fd48d feat(static): add ftp, gettext, gmp, imagick, mbregex, parallel, protobuf, shmop, soap, ssh2, sysmsg, sysvshm, tidy, xlswriter, yaml and zstd extensions (#773) 4 месяцев назад
worker.go 07a74e5c5a perf: reduce allocs when creating $_SERVER (#540) 6 месяцев назад
worker_test.go 07a74e5c5a perf: reduce allocs when creating $_SERVER (#540) 6 месяцев назад

README.md

FrankenPHP: Modern App Server for PHP

FrankenPHP

FrankenPHP is a modern application server for PHP built on top of the Caddy web server.

FrankenPHP gives superpowers to your PHP apps thanks to its stunning features: Early Hints, worker mode, real-time capabilities, automatic HTTPS, HTTP/2, and HTTP/3 support...

FrankenPHP works with any PHP app and makes your Laravel and Symfony projects faster than ever thanks to their official integrations with the worker mode.

FrankenPHP can also be used as a standalone Go library to embed PHP in any app using net/http.

Learn more on frankenphp.dev and in this slide deck:

Slides

Getting Started

Docker

docker run -v $PWD:/app/public \
    -p 80:80 -p 443:443 -p 443:443/udp \
    dunglas/frankenphp

Go to https://localhost, and enjoy!

[!TIP]

Do not attempt to use https://127.0.0.1. Use https://localhost and accept the self-signed certificate. Use the SERVER_NAME environment variable to change the domain to use.

Standalone Binary

If you prefer not to use Docker, we provide standalone FrankenPHP binaries for Linux and macOS containing PHP 8.3 and most popular PHP extensions: Download FrankenPHP

To serve the content of the current directory, run:

./frankenphp php-server

You can also run command-line scripts with:

./frankenphp php-cli /path/to/your/script.php

Docs

Examples and Skeletons