php-transpiler

0.4.0 • Public • Published

php-transpiler

Transpiler API to convert php-parser AST to Javascript

npm version Build Status Coverage Status Gitter

Installation

This library is distributed with npm :

npm install php-transpiler --save

Usage

// 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);

Will output :

module.exports = function($php) {
  $php.stdout.print ('hello world');
};

Misc

This library is released under BSD-3 license clause.

Readme

Keywords

Package Sidebar

Install

npm i php-transpiler

Weekly Downloads

7

Version

0.4.0

License

BSD-3-Clause

Last publish

Collaborators

  • ichiriac