Awesome
PIB: PHP in Browser
Firefox is recommended for better user experience.
Examples
- Hello, World
- JSON
- Closures
- PCRE
- Multi catch exception handling
- Scalar type declarations
- File access
- Zend/bench.php (Benchmark, about 5x slower in Firefox than native PHP)
Building From Source
Using Docker
The quickest way to build PIB is by using Docker:
docker run --rm -it -v $(pwd):/src trzeci/emscripten-ubuntu:latest bash build.sh
Setup Emscripten SDK (emsdk) manually
Steps:
- Setup emsdk (>= 1.38.11), see Installation Instructions
- Run
bash build.sh
Acknowledgements
The Web UI is based on Rust Playground.