Skip to content
This repository was archived by the owner on Feb 4, 2026. It is now read-only.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP WASI build

This is a WASI build of the PHP 8.2 interpreter compiled by VMware Labs.

It is published as an NPM package @antonz/php-wasi:

https://unpkg.com/@antonz/php-wasi/dist/php-cgi.wasm
https://unpkg.com/@antonz/php-wasi/dist/php-cgi-slim.wasm

Usage

Using the Runno runtime:

import { WASI } from "https://unpkg.com/@antonz/runno/dist/runno.mjs";

const url = "https://unpkg.com/@antonz/php-wasi/dist/php-cgi.wasm";
const result = await WASI.start(fetch(url), {
    args: ["php", "--version"],
    stdout: (out) => console.log(out),
    stderr: (err) => console.error(err),
});
console.log(`exit code = ${result.exitCode}`);

Result:

PHP 8.2.6 (cgi-fcgi) (built: Jul 14 2023 11:22:44)
Copyright (c) The PHP Group
Zend Engine v4.2.6, Copyright (c) Zend Technologies
exit code = 0

Building from source

make prepare
make build

License

Copyright 2023 VMware Labs, Apache-2.0 license.

PHP is copyrighted by The PHP Group, PHP License v3.01.

About

PHP WASI build.

Topics

Resources

Stars

11 stars

Watchers

1 watching

Forks

Used by

Contributors

Languages