A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/endel/js2php below:

endel/js2php: JavaScript (ES6) to PHP source-to-source transpiler.

JavaScript to PHP source-to-source transpiler. Online demo

This is an experiment. Please do not use it.

Convert a single JavaScript file into PHP:

js2php examples/simple.js > simple.php

Since js2php outputs the PHP code to stdout, you may run it right after conversion:

js2php examples/class.js | php

What does it converts?

Tests are simple input (js) / output (php) comparisions.

  1. Create your source .js file at test/fixtures/js_feature.js
  2. Convert your .js to .php manually: node test/generate.js js_feature.js
  3. Run npm test

MIT


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4