Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
P

pib

> 编程语言
Open source

PHP in Browser (powered by WebAssembly)

989 stars0 likes0 views
WebsiteGitHub

About

PHP in Browser (powered by WebAssembly)

PIB: PHP in Browser (and Node.js) aka php-wasm

v0.0.4 - Revisiting.

changelog

Examples

  • Hello, World
  • phpinfo()
  • Persistent Memory
  • Access The DOM
  • goto
  • Standard Output, Standard Error, & Return
  • Sqlite
  • Sqlite w/PDO
  • JSON
  • Closures
  • File access
  • Zend/bench.php
  • Drupal 7

Getting Started

Install with npm:

bash
$ npm install php-wasm

Static Assets:

You'll need to add the following postinstall script entry to your package.json to ensure the static assets are available to your web application. Make sure to replace public/ with the path to your public document root if necessary.

json
{
  "scripts": {
    "postinstall": [
      "cp node_modules/php-wasm/php-web.* public/"
    ]
  },
}

If you're using a more advanced bundler, use the vendor's documentation to learn how to move the files matching the following pattern to your public directory:

./node_modules/php-wasm/php-web.*

Usage

Using php-wasm is easy.

Automatic

Once the library is included in the page, you can run PHP right from a script tag! The src attribute is also supported for non-inline

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

PHPphpwasmwebassembly

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言