php-wasm-xmlwriter
v0.1.0
Published
xmlwriter for php-wasm.
Readme
php-wasm-xmlwriter
php-wasm-xmlwriter provides the xmlwriter extension for php-wasm.
Install
npm install php-wasm php-wasm-libxml php-wasm-xmlwriterWhat It Loads
The package resolves the active runtime version to php8.x-xmlwriter.so.
Load php-wasm-libxml alongside it when you are using XMLWriter as a shared or dynamic extension.
Usage
import { PhpWeb } from 'php-wasm/PhpWeb.mjs';
import libxml from 'php-wasm-libxml';
import xmlwriter from 'php-wasm-xmlwriter';
const php = new PhpWeb({
version: '8.4',
sharedLibs: [libxml, xmlwriter],
});
await php.run(`<?php var_dump(extension_loaded('xmlwriter'));`);Custom Builds
Enable WITH_XMLWRITER in .php-wasm-rc.
Shared and dynamic XMLWriter builds also need WITH_LIBXML enabled.
Build Options
WITH_XMLWRITER: defaults todynamic. Allowed values:0,1,static,dynamic.WITH_LIBXML:WITH_XMLWRITER=staticrequiresWITH_LIBXML=static.WITH_XMLWRITER=dynamicrequires libxml to be enabled in the build.
