I have a very large Ruby on Rails application that I would like to port to PHP 5.2 or maybe PHP 5.3 (if 5.3 ever gets released).
I've been looking for a some way of automatically converting the simple stuff like simple classes and the ERB templates. I would expect that I'd have to do the more complicated stuff myself in cases where the languages are just too dissimilar.
Can anyone suggest an approach for doing this? Or a script that can automate some of it?
EDIT:
There is a business case for doing this. Whether it is a sound business case is another issue which I don't care to discuss here. We have a framework that is similar enough to Rails - the real issue is conversion from Ruby to PHP rather than Rails to PHP. I'm not really looking for something that will magically do all the work, just something simple that will give a headstart. Even if all it did was change:
def somemethod somearg
some.ruby.code
end
to:
public function somemethod($somearg) {
// some.ruby.code
}
and left the innards as ruby in php comments that would still make the job easier.
Ideally there would be something out there that does this or similar already. Otherwise I might have to the write tool myself.