npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@php-wasm/universal

v3.1.34

Published

PHP.wasm – emscripten bindings for PHP

Readme

Shared PHP.wasm runtime API

@php-wasm/universal contains the runtime pieces shared by @php-wasm/node, @php-wasm/web, and the Playground client packages.

Most applications should start with loadNodeRuntime() from @php-wasm/node or loadWebRuntime() from @php-wasm/web. Use this package directly when you need the lower-level PHP request handler, filesystem helpers, or extension staging primitives.

PHP extension manifests

External PHP extensions are loaded before PHP starts. They are supported in JSPI runtimes only. A manifest lets a package publish one extension name with artifacts for the PHP version matrix:

{
	"name": "wp_mysql_parser",
	"version": "0.1.0",
	"artifacts": [
		{
			"phpVersion": "8.4",
			"sourcePath": "wp_mysql_parser-php8.4-jspi.so"
		}
	]
}

sourcePath may be absolute, or relative to the manifest URL. If you pass an inline manifest instead of manifestUrl, pass baseUrl to choose where relative artifact files are resolved from.

Asyncify extension loading is reserved for bundled extensions shipped with the PHP.wasm packages, such as intl, xdebug, redis, and memcached.

Lower-level extension staging

resolvePHPExtension() turns bytes, a direct artifact URL, or a manifest into a ResolvedPHPExtension. withResolvedPHPExtensions() then augments Emscripten options so the extension .so, generated .ini, sidecar files, and environment variables are ready before PHP scans its .ini files. When loadWithIniDirective is false, the .so and sidecar files are still staged but no .ini file or PHP_INI_SCAN_DIR entry is generated.

import { resolvePHPExtension, withResolvedPHPExtensions } from '@php-wasm/universal';

const extension = await resolvePHPExtension({
	phpVersion: '8.4',
	source: {
		format: 'manifest',
		manifestUrl: new URL('https://cdn.example.com/wp_mysql_parser/manifest.json'),
	},
});

const emscriptenOptions = withResolvedPHPExtensions({}, [extension]);

Direct bytes skip URL resolution:

await resolvePHPExtension({
	phpVersion: '8.4',
	name: 'wp_mysql_parser',
	source: { format: 'so', bytes },
});