You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

@php-wasm/node

Package Overview
Dependencies
Maintainers
7
Versions
218
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@php-wasm/node

PHP.wasm for Node.js

Source
npmnpm
Version
3.1.3
Version published
Maintainers
7
Created
Source

WebAssembly PHP for Node.js

This package ships WebAssembly PHP binaries and the JavaScript API optimized for Node.js. It comes with the following PHP extensions:

  • SQLite
  • Libzip
  • Libpng
  • CLI
  • OpenSSL
  • MySQL

It uses the host filesystem directly and can access the network if you plug in a custom WS proxy.

Here's how to use it:

import { PHP } from '@php-wasm/universal';
import { loadNodeRuntime } from '@php-wasm/node';

const php = new PHP(await loadNodeRuntime('8.3'));

const output = await php.runStream({
	code: '<?php phpinfo(); ?>',
});

console.log(await output.stdoutText);

Attribution

@php-wasm/node started as a fork of the original PHP to WebAssembly build published by Oraoto in https://github.com/oraoto/pib and modified by Sean Morris in https://github.com/seanmorris/php-wasm.

FAQs

Package last updated on 02 Mar 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts