Async Scheduler Hook API
A mechanism for activating concurrent execution at the PHP core level. The core exposes dedicated hooks that let the scheduler implementation live in a separate extension, or even in PHP code.
- Strict opt-in: zero overhead until a scheduler is registered
- Fiber-compatible: existing Fiber code keeps working, and fibers are adopted onto the schedule
- Continuation: a symmetric A→B context switch built on top of Fiber machinery
- A single registration point:
SchedulerHook::register()activates concurrency engine-wide - Per-coroutine context isolation: separate userland and internal contexts
- Ecosystem freedom: the core standardizes only activation and the scheduler interface, while
spawn()/await()/ channels stay up to the implementation