The Pragmatism of ePHPm - Every Decision Has a "Because" Behind It
ePHPm hit v0.1.0 this week. It isn't a rewrite-it-in-Rust project. Here's what I built, what I borrowed, what I sent upstream, and what I deliberately haven't built.
Open Source · AI · Containers · VMs · Kubernetes · Windows · Go by way of PHP
ePHPm hit v0.1.0 this week. It isn't a rewrite-it-in-Rust project. Here's what I built, what I borrowed, what I sent upstream, and what I deliberately haven't built.
Embedding PHP in a multithreaded server means PHP's timeout signals can land on any thread. How ePHPm got that under control.
Last week I wrote about why ePHPm embeds PHP from Rust and promised the signal bug its own post. Here it is. It’s the kind of bug where the fix is about ten lines and the explanation is the whole post. Nothing in PHP’s embed documentation (there’s barely any) tells you that initializing PHP has process-wide side effects. Those side effects assume PHP is the only thing in the process.
I'm a Go developer building a PHP application server in Rust. Here's the FFI reasoning, the C wrapper it forced on me, and what cgo actually costs when you measure it.
Go is my primary language and has been for a long time. When I started building ePHPm
a few weeks ago the obvious move was to write it in Go. ePHPm is a PHP application server. It’s one binary that embeds
the real PHP interpreter (libphp, the Zend engine) and puts an HTTP server, TLS, a KV cache and a database proxy
around it. A PHP app doesn’t need nginx + php-fpm + Redis to run. FrankenPHP already proved
the “PHP inside a Go web server” idea works, and it works well. I…