FrankenPHP: Modern PHP App Server
What FrankenPHP Is
- Described as a Caddy-based HTTP/HTTPS server with PHP compiled in via CGO: one binary, one process.
- Acts as an app server and process manager (worker pool, HTTPS, ACME), not a new interpreter; uses standard PHP (libphp).
- Can optionally embed PHP scripts into the binary for “self-executable” apps.
Setup, Docker, and Security Concerns
- Docs show mounting
$PWDto/app/public, which would expose.git,.env, etc.; several comments call this dangerous for newcomers and suggest clearer guidance. - Production guide suggests
COPY . /app/public, relying on.dockerignoreto filter secrets; some see this as risky if misused. - Debate over requiring app code in the web root vs more modern
public/-only setups.
Performance and Worker Mode
- Key value: worker mode keeps frameworks (Laravel, Symfony, etc.) warm between requests, avoiding boot cost.
- Claims of ~3x speedup over FPM when worker mode is used, but multiple users report severe underperformance in some scenarios.
- There is an open discussion about perf issues; maintainers say they need reproducible cases and are working with PHP core on outliers.
- Some argue “alternative runtimes” only win when FPM is misconfigured and can degrade over time due to non–shared-nothing semantics; others say benefits are workload-dependent.
Comparison to Traditional PHP Stacks
- Many note that nginx/apache + php-fpm is easy enough once you know it; others stress the barrier for newcomers and the appeal of a single binary.
- mod_php is seen by some as simpler and lower-latency per request, but others point out its memory and security drawbacks and that Apache itself recommends proxy_fcgi/FPM.
Use Cases: Frameworks, WordPress, Dev vs Prod
- Strong fit for modern frameworks supporting worker mode and Laravel Octane (FrankenPHP is an Octane driver).
- WordPress currently gains little performance benefit (no worker mode), though FrankenPHP can simplify deployment and caching.
- Built-in PHP dev server is acknowledged as non-production; FrankenPHP is positioned as production-ready Caddy+PHP, though some remain cautious until perf issues are clearer.
Alternatives and Ecosystem Fit
- Alternatives mentioned: Roadrunner, Swoole/Openswoole, Nginx Unit, Workerman, ReactPHP, ngx-php.
- Distinction: many alternatives require PSR-7 or special integration; FrankenPHP can also run legacy/superglobal-based apps.
- Discussion branches into Go/.NET/Rust single-binary culture vs multi-service PHP/LAMP, with differing preferences on complexity vs convenience.