Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

looking for transpiler: php to javascript [closed]

i wonder, if there's any transpiler available, which converts (simple) php code to javascript?

what i am not looking for is ajax stuff or javascript libraries imitating php functionality, but i am looking for a translater, which is able to generate javascript code from php code (similar of what google is doing with GWT and the java-to-javascript transpiler).

thanks!

like image 420
aurora Avatar asked Jan 03 '10 15:01

aurora


2 Answers

The uniter php to js transpiler can do this: http://asmblah.github.io/uniter/

like image 124
justspamjustin Avatar answered Sep 23 '22 05:09

justspamjustin


You can use something like this: http://www.harmony-framework.com/
But notice, that Javascript has lots of security issues PHP avoids. And straight conversion is not always possible for Database-related function calls or some other PHP extensions

like image 1
alemjerus Avatar answered Sep 21 '22 05:09

alemjerus