Skip to content

Instantly share code, notes, and snippets.

@ichiriac
Created January 24, 2017 13:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ichiriac/6756053e780f94da9647d4279557daad to your computer and use it in GitHub Desktop.
Save ichiriac/6756053e780f94da9647d4279557daad to your computer and use it in GitHub Desktop.
Quick Start / Usage / php-transpiler
// initialize the php parser factory class
var engine = require('php-parser');
var transpiler = require('php-transpiler');
var jsCode = transpiler.generate(
engine.parseCode('<?php echo "Hello World";')
);
console.log(jsCode);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment