开发者

Convert PHP code to C#

开发者 https://www.devze.com 2022-12-26 06:01 出处:网络
Is there a we开发者_如何学运维b site or tool that will convert a piece PHP code to C#? something similar to

Is there a we开发者_如何学运维b site or tool that will convert a piece PHP code to C#?

something similar to

http://converter.telerik.com/

or

http://www.developerfusion.com/tools/convert/csharp-to-vb/


If you love .net, then you may try converting to ASP.net. syntaxes are mostly similar(Argument, guys!! :).

Otherwise you may use Phalanger(http://www.php-compiler.net/doku.php )

Installing this on your ASP.NET web server allows you to deploy PHP code, even full applications like wordpress.


I don't know any such tool -- and I'd suppose that any automated tool to do that kind of "conversion" between two languages that are quite different would not do such a good job...

PHP being interpreted (well, more or less), and C# being compiled, those languages are quite not similar... Which means an automated tool will probably not be able to convert everything (as an example, Facebook's HipHop for PHP converts PHP to C++, but cannot convert everything -- it cannot convert eval and such things, for example), and/or will not be as good as an intelligent human-being.


I know this thread was answered already, but I wanted to contribute the PHP to ASP.Net Migration Assistant. Its for 1.x, but still usable. As mentioned, the difference in the architectures make this kind of automatic conversion an impossibility, but nothing says tools can't help.

0

精彩评论

暂无评论...
验证码 换一张
取 消