FrankenPHP, JIT &amp; Preloading for Laravel Throughput | Mohamed Said        [  ![Mohamed Said](https://cdn.msaied.com/01KT78WE565VEMM3PSNQAAB0MH.png)   Mohamed Said Laravel Backend Engineer  ](https://msaied.com) [ Home ](https://msaied.com) [ Projects ](https://msaied.com/projects) [ Articles  ](https://msaied.com/articles) [ Certificates ](https://msaied.com/certificates) [ Contact ](https://msaied.com#contact-section) 

       [  ](https://github.com/EG-Mohamed)       

 [ Home ](https://msaied.com) [ Projects ](https://msaied.com/projects) [ Articles ](https://msaied.com/articles) [ Certificates ](https://msaied.com/certificates) [ Contact ](https://msaied.com#contact-section) 

  [ home ](https://msaied.com)    [ articles ](https://msaied.com/articles)    FrankenPHP, OPcache JIT, and Preloading: Squeezing Real Throughput from Laravel        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)

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

  #laravel   #frankenphp   #performance   #opcache   #php  

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

     23 Aug 2026      1 min read    ![Mohamed Said](https://cdn.msaied.com/01KT78WE565VEMM3PSNQAAB0MJ.jpg)  Mohamed Said  

       Table of contents

1. [  01   Why FrankenPHP Changes the Equation  ](#why-frankenphp-changes-the-equation)
2. [  02   Worker Mode: Persistent Application Bootstrap  ](#worker-mode-persistent-application-bootstrap)
3. [  03   OPcache Preloading  ](#opcache-preloading)
4. [  04   JIT: Tracing vs Function Mode  ](#jit-tracing-vs-function-mode)
5. [  05   Production Checklist  ](#production-checklist)
6. [  06   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/)
