/pyhp.js

PyHP.js is a PHP interpreter in JavaScript running in a web browser

Primary LanguageMakefile

PyHP.js

Alt text

PyHP.js compiles PyHP interpreter to a JavaScript VM.

Highly unstable and work in progress.

Based on PyPy compiled to JavaScript.

How does it work?

PyHP PHP interpreter written in Python is translated into C using RPython, translated into JavaScript using emscripten.

The resulting javascript file is asm.js. It can be loaded in any browser or ran with Node.js.

Building

docker pull rfkelly/pypyjs-build
make build
node build/pyhp.vm.js example.php

Or build the less optimized, but easier to inspect debug version

make build-debug
node build/pyhp-debug.vm.js example.php

Why?

TBD