js2php icon indicating copy to clipboard operation
js2php copied to clipboard

JavaScript (ES6) to PHP source-to-source transpiler.

Results 16 js2php issues
Sort by recently updated
recently updated
newest added

I've tried to transpile my [S-Expression parser to php](https://github.com/jcubic/lip/blob/master/parser.js) But got this error: ``` /mnt/ssd/projects/jcubic/lip/node_modules/js2php/core/string.js:119 var regexpData = args[0].raw.match(/^\/([^\/]+)\/([gimy])?$/), ^ TypeError: Cannot read property 'match' of undefined at split (/mnt/ssd/projects/jcubic/lip/node_modules/js2php/core/string.js:119:34)...

hi there, i can not convert the js tweetnacl library into php. it is an encryption library written in C and converted to js code. here is the library https://github.com/dchest/tweetnacl-js/blob/master/nacl-fast.js...

This may be related to issue #41. I failed with this JS code. ``` function compute() { var some = [1,2,3]; var any = some[2]; } ``` The Github page...

```javascript function f(x) { return x[1]; } ``` http://endel.me/js2php/ It cannot translate it.

Cannot read property 'shift' of undefined

There's no mention which version of PHP this targets in [README.md](https://github.com/endel/js2php/blob/master/README.md#features). Is it version 7.3, 7.2, 5.6? Is there a way to control which version of PHP is targeted?

Given the following JS code: ```javascript let a = {}; a.foo = 123; var_dump(a.foo); ``` **js2php** transpiles it to: ```php $a = array(); $a->foo = 123; var_dump($a->foo); ``` But the...

first at all - Nice project for simple functions. Would be gread if you remove console.log from js