· via dev.to (home feed)
Unmodified Zend PHP engine reaches 1.0.0 on ESP32 microcontrollers
PHP on ESP32 has shipped version 1.0.0: the unmodified Zend engine cross-compiled to run bare metal on roughly $4 boards, with the standard library, OPcache and per-request HTTP serving.

Real PHP on a $4 chip
The PHP-on-ESP32 project has published version 1.0.0, its first official release, bringing the genuine PHP interpreter — the unmodified Zend engine as distributed by php.net — to Espressif's ESP32 family of microcontrollers. According to the September 9 announcement on dev.to, the engine's C source is built with the chip's own toolchains (riscv32-esp-elf for the ESP32-P4, xtensa-esp32s3-elf for the ESP32-S3) and wired in through PHP's official embed SAPI, the same interface any host C program would use. There is no operating system underneath, no transpiler and no cut-down dialect: a script follows the ordinary path from source to tokens to AST to opcodes, executed natively on the board's CPU.
Because the whole engine is compiled in, the full language surface is present — classes, closures, generators, enums, typed properties, exceptions — along with an always-on standard library covering ext/standard, PCRE, JSON, hashing, SPL, reflection and the CSPRNG.
What 1.0.0 ships
Optional extensions are layered on per project. The dev.to post lists mbstring, filter, tokenizer and PDO SQLite for an on-card or in-memory database; a session implementation for web-server mode; a key-value store backed by the chip's NVS that survives reboots, with a volatile in-RAM twin; and .env-style configuration baked into the firmware and exposed through $_ENV and getenv(). The Zend OPcache has been ported in static form, without the JIT, caching bytecode so a request stops recompiling a framework every time. For TLS there are two OpenSSL builds: a compact mbedTLS-backed option and a full OpenSSL 3.0 one.
Hardware access comes from a small built-in extension providing gpio_mode, gpio_write, gpio_read and delay, with an Arduino-style setup()/loop() lifecycle in which the repeating loop runs in C so the board's watchdog is not starved.
Measured performance
Benchmarks in the announcement, captured on an ESP32-S3-Zero "Super Mini" with 2 MB PSRAM at 80 MHz and a 160 MHz CPU running PHP 8.4.25, show the constraints. After boot, 744.7 KB of PSRAM and 183.4 KB of internal RAM were free. Compiling a 167-line, 4.2 KB source file consumed 22.4 KB of PSRAM, and a 1,090-row working set occupied 403.1 KB.
The GPIO numbers show the interpreter tax plainly: a PHP tight loop managed about 309,687 writes per second (3,229 ns per write), while native C reached roughly 2.8 million writes per second — around nine times faster. Enough for blinking LEDs and moderate logic, clearly not for hard real-time pin work.
The board as web server
On networked hardware, the firmware can run an HTTP server that hands each request to a fresh PHP execution, populating $_SERVER, $_GET, $_POST, cookies and sessions, with script output forming the response body. According to dev.to, stock Laravel and Symfony both serve pages this way on an ESP32-P4 with 32 MB PSRAM — not forks or trimmed builds.
Since every ESP32-S3 has WiFi on the die, a board can create its own access point and serve a page directly. One bundled example boots an AP and serves a live PHP page that drives the onboard RGB LED from a phone — no cloud service, broker or companion app in between.
Requirements and tooling
Two factors decide whether a chip qualifies: external PSRAM, since the runtime heap needs megabytes, and at least 8 MB of flash for a firmware image of roughly 3 MB. Core architecture does not matter — the portable VM builds on both Xtensa and RISC-V. PHP 8.3.33, 8.4.25 and 8.5.10 all build today, selectable per project, and an entry ESP32-S3 board with PSRAM costs around $4.
The supported workflow is phpflash, a single-binary CLI that scaffolds a project, drives the build, flashes the connected board and opens the serial console — a short loop from editing a script to seeing it run on hardware.
Why it matters
The project's author is candid that 1.0.0 is a milestone aimed at hobby use rather than production deployment — it began as a holiday side project. Even so, the release removes a real barrier: developers who already know PHP, its standard library and its request-per-script model can now target microcontrollers without learning C or a new embedded toolchain. A $4 board serving an actual Laravel page over its own WiFi network is a striking demonstration that the boundary between web development and embedded development is thinner than assumed, and the public roadmap suggests the project intends to keep pushing it.
- #php
- #esp32
- #embedded
- #microcontrollers
- #zend-engine