Zend Park: Heap-Backed Continuations for Synchronous PHP on Serverless WebAssembly
Year: 2026
Type: preprint
Abstract: Serverless WebAssembly hosts expose I/O through asynchronous host APIs, while existing PHP applications commonly expect blocking operations to return before their computations continue. This paper presents Zend Park, a PHP 8.5 extension and host-side execution driver that suspends selected synchronous computations without preserving their original native WebAssembly call stacks. Under Zend’s ZEND_VM_KIND_CALL execution model, the extension retains the heap-resident zend_execute_data chain and VM stack, records the suspended instruction and return state, exits the active interpreter invocation through longjmp(), and subsequently re-enters execute_ex() after the host completes the pending operation. A conservative execution-frame predicate rejects unsupported internal-function ancestry, while two audited callback trampolines can be selectively removed from the saved execution chain. We evaluate the mechanism through paired native and WebAssembly continuation probes, cross-invocation tests against the shipping interpreter, an authenticated Redis RESP exchange, and a Drupal OpenID Connect authentication flow using a userland fetch transport. These experiments demonstrate repeated suspension and resumption while preserving the original PHP computation across supported execution paths, and they also identify generator-body and destructor-related failures, a one-held-chain-per-interpreter model, and the requirement that the original interpreter remain alive. Operational measurements distinguish PHP-level park events from actual network round trips and characterize the latency introduced by sequential host operations. The results demonstrate a bounded interpreter-level continuation mechanism for integrating synchronous PHP applications with asynchronous serverless hosts; it does not claim a throughput advantage over existing WebAssembly suspension mechanisms.
Source: Figshare
Author: Gregory Mitchell
Language: English
Subfield: Information Systems
Field: Computer Science
Domain: Physical Sciences
Keywords: trampoline, OpenID Connect
Open Access status: green
OpenAlex ID: W7236163989
