Build PHP¶
Docker builds PHP, node runs it, and any static server serves it to a browser. Clone the repository, then:
This builds PHP 8.5.12, with the extensions listed in Supported extensions. Another version, or other extensions, are build arguments. The first build compiles everything, and takes a while: the next ones only compile again what changed.
The files end up in build/php-8.5/:
php-web.mjsandphp-web.wasm, for the browser, andphp-sw.js, for a service worker;php-node.mjsandphp-node.wasm, for node.
Next: run it in node, or in a page.