简体   繁体   中英

Convert PHP code to C#

Is there a web 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM