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

Davy Goossens 6c0292af99 fix(static): remove -lgcc_s flag (#1026) 5 days ago
.github 7a524ddbd5 ci: add back -Wall -Werror 1 month ago
caddy a4ac4eb3fb fix: placeholders in environement variables (#1018) 2 weeks ago
docs 47257ec919 docs: add performance docs (#1004) 3 weeks ago
internal aa1d968dcf refactor: faster $_SERVER variables creation 10 months ago
testdata 47257ec919 docs: add performance docs (#1004) 3 weeks ago
.dockerignore 6f108a4203 fix: do not extract embedded app on every execution (#488) 8 months ago
.gitignore 2e72b50d10 ci: add Apple Silicon build script (#313) 10 months ago
.hadolint.yaml c9bf9940d1 ci: add Super-Linter (#323) 9 months ago
.markdown-lint.yaml c9bf9940d1 ci: add Super-Linter (#323) 9 months ago
CONTRIBUTING.md 0500ebc191 perf: improve PHP thread management (#898) 2 months ago
Dockerfile 968176a948 ci: run tests with ASAN and MSAN (#955) 1 month ago
LICENSE f8bdd640cf docs: add license (#24) 1 year ago
README.md 47257ec919 docs: add performance docs (#1004) 3 weeks ago
SECURITY.md ac37760e37 docs: create SECURITY.md 1 month ago
alpine.Dockerfile 968176a948 ci: run tests with ASAN and MSAN (#955) 1 month ago
app.tar 537f899939 feat: use tar to embed apps (#333) 9 months ago
app_checksum.txt 6f108a4203 fix: do not extract embedded app on every execution (#488) 8 months ago
build-static.sh 6c0292af99 fix(static): remove -lgcc_s flag (#1026) 5 days ago
cgi.go 07a74e5c5a perf: reduce allocs when creating $_SERVER (#540) 6 months ago
dev-alpine.Dockerfile 6c708be99d ci: upgrade to super-linter 6 (#952) 1 month ago
dev.Dockerfile 6c708be99d ci: upgrade to super-linter 6 (#952) 1 month ago
docker-bake.hcl 0751f453b9 fix: create a custom Go build when using musl to prevent a crash (#913) 2 months ago
embed.go 25a858954c fix: temporary directory name for embed apps 4 months ago
frankenphp.c d532772355 fix: reset sapi response code (#964) 1 month ago
frankenphp.go a16076e082 perf: prevent useless logger allocs 3 weeks ago
frankenphp.h 07a74e5c5a perf: reduce allocs when creating $_SERVER (#540) 6 months ago
frankenphp.png 625ab8906f docs: update logo 1 year ago
frankenphp.stub.php ea5e19ff4b fix: getallheaders() must return request headers (#772) 4 months ago
frankenphp_arginfo.h ea5e19ff4b fix: getallheaders() must return request headers (#772) 4 months ago
frankenphp_test.go a16076e082 perf: prevent useless logger allocs 3 weeks ago
go.mod d968334371 chore: bump deps 3 weeks ago
go.sum d968334371 chore: bump deps 3 weeks ago
options.go 07a74e5c5a perf: reduce allocs when creating $_SERVER (#540) 6 months ago
recorder_test.go 5012ac30cd chore: improve tests and add missing file (#13) 1 year ago
release.sh 6c708be99d ci: upgrade to super-linter 6 (#952) 1 month ago
reload_test.sh 6c708be99d ci: upgrade to super-linter 6 (#952) 1 month ago
request_options.go db12b4e113 perf: cache document root resolution when possible 3 weeks ago
smartpointer.go 5bda50cbd7 Fix memory leak (#442) 8 months ago
static-builder.Dockerfile 6c708be99d ci: upgrade to super-linter 6 (#952) 1 month ago
worker.go a16076e082 perf: prevent useless logger allocs 3 weeks ago
worker_test.go a16076e082 perf: prevent useless logger allocs 3 weeks ago

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