是否可以自动将Java代码转换为PHP? [英] Is it possible to automatically convert java code to PHP?

查看:1941
本文介绍了是否可以自动将Java代码转换为PHP?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有将java代码转换为php的工具?我有java库的源代码,我需要它转换为php。

Is there are tools for converting java code to php? I have source code of java library and I need it to convert 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是一种强类型语言,PHP不是,所以来源源代码编译器很少见,代码转换过程也不完整。不过这说,有一个相当不错的免费演示: http://javatophp.com

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

这篇关于是否可以自动将Java代码转换为PHP?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆