← 所有消息

What changes when the process stops dying

Computed statics now clear between requests in worker mode, which is the kind of fix that only becomes necessary once PHP stops behaving the way everyone assumes it does.

The classic request lifecycle gives request state a fresh boundary. Worker mode changes that deal: the app boots once and stays resident, and PHP static properties and function-local statics now have the lifetime of the process rather than the request.

Phlo caches computed statics reached through the _x() fallback process-globally in the base class, which is what makes them cheap. Under a persistent worker their results bled into the next request: stale state surviving into requests where it had no business.

The cache is now cleared in the reset that runs at the top of the worker and daemon loop, and nowhere else. That distinction matters. A classic non-worker app keeps its static freedom, because there the process boundary already does the job.

The model still keeps its runtime state on %req. That makes the request lifetime explicit; clearing the computed-static cache is a second guard, not a reason to move user, record or error state back into a static.

The rule worth carrying: in worker mode a static holds class shape, never anything scoped to a request or a user.

Engine 1.0. See the Performance chapter.

我们使用必要的cookie来使该网站正常工作。在您的许可下,我们还使用分析工具来改善网站。