Is it possible to automatically convert java code to PHP? Is it possible to automatically convert java code to PHP? php php

Is it possible to automatically convert java code to PHP?


It is possible to automatically convert it. This is called a source to source compiler. Normally when you compile software, the parser will build an abstract syntax tree and convert this into the target machine language code. But it is just as possible to have a compiler convert this into another high level (compilable) language.

Java is a strongly typed language, and PHP is not, so source to source compilers are rare and the code conversion process is incomplete. However this said, there is a reasonably good one with a free demo at: http://javatophp.com


Automatically - No. Now. Maybe in future. Don't spend time, write new code bro.


I don't think there is a solution like this currently.

You might try using a php-java bridge that would allow you to call the java code from within PHP:http://php-java-bridge.sourceforge.net/pjb/

Zend Server also provides a bridge