php / php/frankenphp

Use auto_globals_jit to make classic mode like worker mode for some use-cases

Open
#1,917 4 comments 3 reactions 1 assignee View on GitHub

@withinboredom is already working on this.

Since Oct 12, 2025.

enhancement
Dominant language
Go
Stars
11.3k
Forks
488
Avg merge
4d 10h
Merged PRs (30d)
11

Description

Describe your feature request

Is your feature request related to a problem? Please describe.

We (myself and @SpencerMalone) were discussing how to use workers to 'bootstrap' an application, then wait for a request, then die() to allow for classical applications to get some performance without having to rewrite them for worker mode.

Describe the solution you'd like

We could maybe specify in the caddyfile:

preheat public/index.php

for a route, then we spawn up some workers that start up the file and once a superglobal is accessed, we pause execution until a request comes through, fill in the superglobals, then continue the script. This requires the use of auto_globals_jit to make work, but older/custom applications will be able to take advantage of performance from frankenphp while implementing worker scripts.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.