How to convert code from C# to PHP

The jsc project can convert .net/C# to PHP for you.

  1. Overview: http://jsc.sf.net
  2. Source: http://jsc.sourceforge.net/examples/web/OrcasAvalonWebApplication/
  3. Example: http://jsc.svn.sourceforge.net/viewvc/jsc/templates/OrcasAvalonWebApplication/ alt text

I know you're hoping for someone who had experience but in case no one comes forward...

You might consider just copy and pasting the code into a PHP script and checking what breaks. Write a parser to fix that, run it across the entire script, and see what's the next thing that breaks. Continue until the script functions as expected.

If you're not using any of the more involved .Net classes I can't imagine you'll have too much trouble.


There is just started project cs2php. Sources are available on https://github.com/isukces/cs2php and homepage is http://www.cs2php.com/ .