Giter VIP home page Giter VIP logo

phan-demo's Introduction

Phan in Browser

Run Phan in your browser (Requires Firefox and at least 4GB of free RAM)].

Preview of analyzing PHP Preview of running php

  • This uses emscripten to allow analyzing (or running) PHP scripts entirely in your browser.

PHP Version: 7.4.0RC5

Phan Version: 2.4.1

This is based on oraoto/pib (PHP In Browser)

Known issues

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 (>= 1.39.1), see 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. python 3 -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).

The Web UI is based on Rust Playground. This uses the ace editor.

phan-demo's People

Contributors

assertchris avatar boyanio avatar marclaporte avatar oraoto avatar tysonandre avatar tysonandre-tmg avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

phan-demo's Issues

ini_set(display_startup_errors, '1') is a no-op, causing some errors to be hidden

This should have a specialized handler like OnUpdateDisplayErrors, but it doesn't? This only matters for embed which is incorrectly marked as during_request_startup.

PG(display_startup_errors)=1 or PG(during_request_startup)=0 can be used to work around this

	STD_PHP_INI_ENTRY_EX("display_errors",		"1",		PHP_INI_ALL,		OnUpdateDisplayErrors,	display_errors,			php_core_globals,	core_globals, display_errors_mode)
	STD_PHP_INI_BOOLEAN("display_startup_errors",	"1",	PHP_INI_ALL,		OnUpdateBool,			display_startup_errors,	php_core_globals,	core_globals)

Support a non-emscripten backend

This might be useful for local setups (e.g. against an internal codebase)

  • This would require hosting, and memory/time limits
  • Don't provide "run" capabilities or UI

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.