FrankenPHP, JIT &amp; Preloading for Laravel Throughput | Mohamed Said       [Skip to content](#main)  [ ![](https://cdn.msaied.com/01KT78WE565VEMM3PSNQAAB0MH.png) Mohamed SaidLaravel Backend Engineer ](https://www.msaied.com/public) - [Home](https://www.msaied.com/public)
- [Projects](https://www.msaied.com/public/projects)
- [Articles](https://www.msaied.com/public/articles)
- [Certificates](https://www.msaied.com/public/certificates)
- [About](https://www.msaied.com/public#about)

           [  Contact](https://www.msaied.com/public#contact) Menu 

Menu
----

Close 

 - [HomeStart here](https://www.msaied.com/public)
- [ProjectsCase studies](https://www.msaied.com/public/projects)
- [ArticlesEngineering notes](https://www.msaied.com/public/articles)
- [CertificatesCredentials](https://www.msaied.com/public/certificates)
- [AboutHow I work](https://www.msaied.com/public#about)
- [ContactGet in touch](https://www.msaied.com/public#contact)

  [Start a conversation](https://www.msaied.com/public#contact) [WhatsApp](https://wa.me/201094619204) [Email](mailto:hello@msaied.com) 

 1. [Home](https://www.msaied.com/public)
2. /
3. [Articles](https://www.msaied.com/public/articles)
4. /
5. FrankenPHP, OPcache JIT, and Preloading: Squeezing Real Throughput from Laravel

 FrankenPHP, OPcache JIT, and Preloading: Squeezing Real Throughput from Laravel
================================================================================

 A practical guide to deploying Laravel under FrankenPHP with OPcache JIT and preloading enabled — covering worker mode, preload scripts, JIT tracing vs function modes, and the gotchas that bite in production.

 ![](https://cdn.msaied.com/01M22N44A70A5MC2S599JP0MPH.webp) [Mohamed Said](https://www.msaied.com/public#person) Published 23 Aug 2026 · Updated 23 Aug 2026 · 1 min read

ShareCopy linkCopied

 ![FrankenPHP, OPcache JIT, and Preloading: Squeezing Real Throughput from Laravel](https://cdn.msaied.com/585/7dc4b3832f33e2c630172d5b5dd24ac1.png) 

  On this page +1. [Why FrankenPHP Changes the Equation](#why-frankenphp-changes-the-equation)
2. [Worker Mode: Persistent Application Bootstrap](#worker-mode-persistent-application-bootstrap)
3. [OPcache Preloading](#opcache-preloading)
4. [JIT: Tracing vs Function Mode](#jit-tracing-vs-function-mode)
5. [Production Checklist](#production-checklist)
6. [Key Takeaways](#key-takeaways)

 Why FrankenPHP Changes the Equation
-----------------------------------

FrankenPHP embeds a PHP runtime directly into a Caddy-based binary. Unlike Swoole or RoadRunner, it requires no PHP extension and no separate process manager — the worker lifecycle is handled by the server itself. Combined with OPcache preloading and JIT compilation, it can serve Laravel applications with latency profiles that rival Node.js, without rewriting a line of application code.

This article focuses on three levers: **worker mode**, **preload scripts**, and **JIT configuration**. Each has sharp edges worth knowing before you push to production.

---

Worker Mode: Persistent Application Bootstrap
---------------------------------------------

FrankenPHP's worker mode boots your Laravel application once and reuses it across requests — the same model Octane uses, but without the Octane dependency.

```php
// frankenphp-worker.php (placed at public/)
