๐ฃ๐๐ฃ ๐ฅ๐๐ป๐๐ถ๐บ๐ฒ ๐๐ฒ๐ป๐ฐ๐ต๐บ๐ฎ๐ฟ๐ธ๐
Stop comparing PHP runtimes with different settings. Many people change versions, JIT settings, or worker counts at once. This makes the results useless.
I isolated one variable. I used the same Symfony code, PHP 8.4, and MySQL 8. I matched the worker count for every test.
Here are the results:
- CPU Tasks: FPM and FrankenPHP tie. JIT does the work. FPM is enough here.
- Read Tasks: Swoole and FrankenPHP win. They are up to 3.5x faster than FPM.
- Write Tasks: FrankenPHP wins. Swoole has connection issues.
Choose your runtime by your load:
- Read-heavy APIs: Use Swoole or FrankenPHP.
- High-write apps: Use FrankenPHP.
- CPU-heavy tasks: Use FPM with JIT.
Modern runtimes win by removing bootstrap time. They keep the application in memory. If you do not have bootstrap overhead, FPM stays competitive. It is also simpler to run.