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

推荐订阅源

博客园 - 司徒正美
M
MIT News - Artificial intelligence
博客园_首页
IT之家
IT之家
L
LangChain Blog
D
DataBreaches.Net
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Google DeepMind News
Google DeepMind News
Blog — PlanetScale
Blog — PlanetScale
人人都是产品经理
人人都是产品经理
博客园 - Franky
云风的 BLOG
云风的 BLOG
罗磊的独立博客
量子位
G
Google Developers Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
博客园 - 【当耐特】
博客园 - 叶小钗
S
SegmentFault 最新的问题
Stack Overflow Blog
Stack Overflow Blog
B
Blog
T
Tailwind CSS Blog
A
About on SuperTechFans
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com

Hacker News: Ask HN

The New Window Delete ChatGPT Atlas Spyware Tell HN: Qwen Free Tier Is Discontinued Ask HN: SeedLegals Partnerships in London, worth it? Ask HN: How to highlight talent from untraditional backgrounds? Ask HN: We dont need a programming language now? Durable Object alarm loop: $34k in 8 days, zero users, no platform warning What if Time at the subatomic level has multiple arrows? How to add MidnightBSD Key to UEFI Secure Boot DBX? (Revoked and Forbidden Keys) Ask HN: What's your experience working at xAI as an AI tutor? Any engineers here with experience of clinical data standards? Ask HN: Who is using OpenClaw? Agent Skills for Software Test Automation Ask HN: Who needs contributors? Claude Code is thinking too much Ask HN: What Is the Big-O Order of a Jigsaw Puzzle? Ask HN: Stepping into a new role as a Senior, mentoring dos and dont's? Founder from Zurich heading to SF and Austin for the first time Hacker News No Manual Screenshots: I Built a Scalable Screenshot API Using Cloud Playwright Ask HN: Thought experiment: AGI giving us answers we don't like? Ask HN: I quit my job over weaponized robots to start my own venture 1% Vacancy, 81% Preleased: Where Midmarket Compute Deploys in 2026 Ask HN: Preferred pricing model for sound effects libraries? Copy of the email I sent to my undergraduate professors on Nov 30, 2025 Model API Performance | Hacker News Ask HN: Are open-weight LLMs the new offline encyclopedias? Valgrind 3.27 RC1 is out Claude Code OAuth down for >12 hours Ask HN: What's Better?–Tauri or Electron?
Ask HN: ZealPHP – Dangers Isolating Request-State in Coro...
sibidharan · 2026-06-02 · via Hacker News: Ask HN

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?