PHP Baremetal is an interesting project I just came across:

php-baremetal runs the official PHP interpreter on microcontrollers. It is not a reimplementation, a language subset, or a transpiler: the upstream Zend engine from php.net is cross-compiled for the chip and executes your index.php opcode by opcode — the same way it would behind a web server.

According to the site this allows the complete Zend engine and standard library, real extensions, and the applications that ride on top, all cross-compiled to the chip's own CPU and run through the official embed SAPI.

The project went public on GitHub at the end of July and has been shipping fast. php-esp32 is the firmware, phpflash is the CLI that drives it, and both are MIT licensed.