Re:FrankenPHP: Modern PHP App Server
by francislavoie on Thursday May 30, 2024 @03:46AM
(#40521188)
It's only an alternative if you're running a framework which also supports those (your PHP app has to be set up in a specific way for Roadrunner or Swoole to be usable).
FrankenPHP has the advantage of working with _any_ PHP app (even WordPress) because it's just PHP, but compiled into a Go program with CGO. But it also has a worker mode which makes it behave similarly to those two.
Ah, I didn't get that. Thanks for the clarification.
Re:FrankenPHP: Modern PHP App Server
by rustatian-me on Thursday May 30, 2024 @01:15PM
(#40526197)
You don't need any framework or specific web-server to use RoadRunner. RoadRunner can be used with any modern framework, or let's say naked, using only the PSR-7 (which is framework-agnostic) worker for HTTP, but:
RR is not only HTTP, it is waaaay above that: Temporal.io support, various queue drivers, gRPC, TCP, KV, Native WebSockets/Broadcast support, distribute locks (without PHP extensions), etc.
RR doesn't need to be somehow specifically set-up. Nothing special, download -> use :)
Re:FrankenPHP: Modern PHP App Server
by francislavoie on Thursday May 30, 2024 @01:21PM
(#40526275)
PSR-7 is framework agnostic, but not all PHP apps are PSR-7 ready. E.g. WordPress. That's the distinction. You can't just point Roadrunner at any PHP script or legacy PHP app and expect it to just run, but you can with FrankenPHP.
Re:FrankenPHP: Modern PHP App Server
by rustatian-me on Thursday May 30, 2024 @01:46PM
(#40526556)
Sure, RR can't serve legacy PHP or WordPress (actually can, but that's not released yet), that's true. But the modern PHP ecosystem leaves lesser and lesser such a non-compatible scripts ;)
Re:FrankenPHP: Modern PHP App Server
by klaussilveira on Thursday May 30, 2024 @06:57AM
(#40522269)
Also:
- ngx-php: https://github.com/rryqszq4/ngx-php
- Workerman: https://github.com/walkor/workerman
- ReactPHP: https://reactphp.org
And the most recent benchmarks:
https://www.techempower.com/benchmarks/#section=test&runid=0...
- Roadrunner https://roadrunner.dev/ (also written in Go)
- Swoole https://www.swoole.com/ https://openswoole.com/
See https://laravel.com/docs/11.x/octane for Laravel specific framework integration.