惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

人人都是产品经理
人人都是产品经理
Stack Overflow Blog
Stack Overflow Blog
S
SegmentFault 最新的问题
博客园 - 司徒正美
aimingoo的专栏
aimingoo的专栏
U
Unit 42
GbyAI
GbyAI
B
Blog RSS Feed
博客园 - Franky
L
LangChain Blog
Hugging Face - Blog
Hugging Face - Blog
美团技术团队
The GitHub Blog
The GitHub Blog
Y
Y Combinator Blog
云风的 BLOG
云风的 BLOG
H
Hackread – Cybersecurity News, Data Breaches, AI and More
博客园 - 三生石上(FineUI控件)
Microsoft Azure Blog
Microsoft Azure Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
G
Google Developers Blog
Last Week in AI
Last Week in AI
阮一峰的网络日志
阮一峰的网络日志
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Apple Machine Learning Research
Apple Machine Learning Research

HN's home page

Rainbow Query Language | Hacker News Exec into Node via Kubectl An AI native hedge fund The Seven-Action Documentation Model | Hacker News Package Manager for Kubectl Plugins Tongan Castaways | Hacker News Tech overlords plan for conscious AI to conquer the cosmos. What could go wrong? Data Breach Disclosure Lag Is Getting Worse How LLMs Work | Hacker News I Dropped PRDs for Shape Up Go Experiments Explained | Hacker News FCA's Palantir deal could expose UK financial data to Trump's US, critics fear WebXR BCI for Neural-Adaptive Avatar Control in Mixed Reality The first murder conviction via DNA analysis Tom Interviews Theo de Raadt of the OpenBSD Project (2019) [video] Show HN: Replace shell commands with bun shell typescript scripts Quay.io Is Down | Hacker News AI driven analysis of brokerage account fees in the UK Bill Gates Spent Years Crafting His Image. Now It's Cracking Using LLMs to secure source code Wi-Fi 8 in the Lab [video] The household battery revolution that could change energy bills and the world Is Python Becoming Pinyin? | Hacker News Livia – Executive Assistant | Hacker News FindMyPipe – Query Apple Find My from Linux for AI Agents Show HN: Agent skill for creating product launch videos with Remotion RecruitMyself – AI job search copilot for resumes and applications AI coding agents and the erosion of system understanding The 'Resting' Generation and South Korea's Youth Recession AMD Computex 2026: 10 Years of AM4, AM5 Support Through 2029
Ask HN: ZealPHP – Dangers Isolating Request-State in Coro...
sibidharan · 2026-06-02 · via HN's home page

I built ZealPHP (https://php.zeal.ninja), a runtime experiment with OpenSwoole - to isolate what leaks between coroutines. The idea is to bring back the good old PHP coding style, but with coroutines, making async a default safe choice.

Github: https://github.com/sibidharan/zealphp

The goal is not to replace Laravel or Symfony. The goal is to replace the execution model of PHP application servers.

OpenSwoole provides the coroutine runtime, HTTP/WebSocket server, workers, timers shared memory, workers etc. ZealPHP adds the application layer: routing, middlewares, sessions, request-scoped superglobals, templating, file-based APIs, isolation-contract, SSE+WS, yield anywhere and some CLI helpers.

A new route can be just a few lines instead of writing apps around raw Openswoole server callbacks. And the old code, just works with 97% Apache+mod_php parity from our weighted assessment. So you have document root and everything where the files are bring served from, you can config everything that you can do via Apache and Nginx. So now PHP is the HTTP server, not a worker that dies.

The hard migration problem is traditional PHP APIs like header(), session_start(), $_GET, $_SESSION etc assume request-local state, while long running coroutines server has many concurrent requests inside one process, that causes leaks. It's mitigated via a custom built PHP extension: ext-zealphp, purpose built to isolate state across coroutine context switches.

The extension is doing the heavy lifting, please look at the isolation contract: https://github.com/sibidharan/ext-zealphp - it binds with on_resume, on_yield, on_close events from Openswoole and performs the isolation

Does it look solid? Whatever mentioned in the Github works now! We still deal with op-cache corruption while testing with Wordpress in coroutines mode, which I am actively working to fix. Thats the hardest, it requires help from upstream at the moment.

However, the framework is useable: One `php app.php` can give you HTTP, WS, SSE, shared memory, task workers from same application server, no seperate Node.js sidecars. The app runs in many modes and the experimental mode "coroutine-legacy" attempts to run the old PHP mental model code in coroutines mode from document root. Of course there are limitations I am trying to solve actively.

I also created a Symfony bridge, CGI compatibility mode for existing apps. I have also created lessons for HN to try: https://php.zeal.ninja/learn

It is alpha now. If you have run long-lived PHP with Swoole/OpenSwoole, Octane, FrankenPHP, RR or ReactPHP, what broke first in production??

Is there any other existing frameworks that does this kind of request-state isolation?