endel / js2php

JavaScript (ES6) to PHP source-to-source transpiler.
https://endel.github.io/js2php/
MIT License
333 stars 41 forks source link

.length not always working on strings #30

Closed 2pha closed 6 years ago

2pha commented 6 years ago

eg. Input:

var st = 'testing';
var hmm = st.length;
console.log(st.length);

Output:

$st = 'testing';
$hmm = strlen($st);
$console->log(count($console));

I am working on a fix.

endel commented 6 years ago

Thanks for the pull-request, @2pha! 👏

Just released 0.1.1 with your fixes.