https://github.com/phan/demo
Run phan entirely in your browser (with emscripten)
https://github.com/phan/demo
phan php static-analysis wasm webassembly
Last synced: about 1 year ago
JSON representation
Run phan entirely in your browser (with emscripten)
- Host: GitHub
- URL: https://github.com/phan/demo
- Owner: phan
- License: mit
- Created: 2019-11-03T20:20:36.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-11-10T01:44:13.000Z (over 3 years ago)
- Last Synced: 2024-04-28T04:49:18.524Z (about 2 years ago)
- Topics: phan, php, static-analysis, wasm, webassembly
- Language: C
- Homepage: https://phan.github.io/demo/
- Size: 28.5 MB
- Stars: 19
- Watchers: 4
- Forks: 5
- Open Issues: 8
-
Metadata Files:
- Readme: Readme.md
- License: LICENSE
Awesome Lists containing this project
README
# Phan in Browser
[Run Phan in your browser](https://phan.github.io/demo/) (Requires Firefox/Chrome and at least 4GB of free RAM)].
[](https://phan.github.io/demo/)
[](https://phan.github.io/demo/)
- This uses emscripten to allow analyzing (or running) PHP scripts entirely in your browser.
PHP Version: 8.0.0
[Phan](https://github.com/phan/phan) Version: 4.0.0-RC2
This is based on [oraoto/pib](https://oraoto.github.io/pib/) (PHP In Browser)
There is also a [demo for PHP 8.0.0-dev](https://phan.github.io/demo/8/)
## Building From Source
### Using Docker
TODO: would these instructions work for phan/demo?
The quickest way to build PIB is by using Docker:
```
docker run --rm -v $(pwd):/src trzeci/emscripten:sdk-incoming-64bit bash -c `apt-get update && apt-get install -y autoconf; build.sh`
```
### Setup Emscripten SDK (emsdk) manually
Steps:
1. Setup emsdk (>= 2.0.9), see [Installation Instructions](https://emscripten.org/docs/getting_started/downloads.html#installation-instructions)
2. Run `bash build.sh` (Install `autoconf` if needed)
## Running locally
This requires that a web server be running and serve static files.
`python3 -m http.server --bind 127.0.0.1 8080` (from the root directory of phan-demo) is one way to do this.
Then, open http://localhost:8080/
## Acknowledgements
This application is based on [PHP in Browser (oraoto/pib)](https://github.com/oraoto/pib).
The Web UI is based on [Rust Playground](https://play.rust-lang.org/).
This uses the [ace](https://ace.c9.io/) editor.