php-dbg-wasm
v0.2.0
Published
phpdbg for wasm.
Maintainers
Readme
php-dbg-wasm
Find php-dbg-wasm on npm
Run the phpdbg runtime in Node.js or ESM-capable browser contexts.
Install
npm install php-dbg-wasmQuickstart
import { PhpDbgNode } from 'php-dbg-wasm/PhpDbgNode';
const php = new PhpDbgNode();
await php.run();
await php.provideInput('help');On current Node releases, the core PhpDbgNode entrypoint can be consumed from either ESM or CommonJS:
const { PhpDbgNode } = require('php-dbg-wasm/PhpDbgNode');
const php = new PhpDbgNode();
await php.run();
await php.provideInput('help');Runtime-loadable extension helper JS packages remain ESM-only; provide extension assets manually through the runtime constructor options when you need to bypass the helper packages.
Filesystem helpers include await php.readdir(path) for names and
await php.readdir(path, {withFileTypes: true}) for serializable {name, isFolder}
entries. Both forms include . and ..; types follow symbolic links and metadata
errors reject the call. See filesystem operations.
For broader project documentation, see:
https://github.com/seanmorris/php-wasm
