Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any way to easily convert Ruby code to PHP? [closed]

Tags:

php

ruby

We need to develop a functionality for one of our client's website. However, we actually have that code ready in Ruby. Is there any way to directly convert that ruby code to PHP?

like image 343
Aditya Avatar asked Nov 05 '22 19:11

Aditya


1 Answers

When you say Ruby code, what exactly are you talking about? A snippet of code that needs to be used somewhere on the website? Or perhaps an entire Ruby on Rails application?

In either case you're not going to find an automated solution to convert this to PHP. In the first case, a skilled PHP developer (ideally with at least some Ruby knowledge) should be able to convert this to PHP fairly easily. But if you're talking about an entire website, it's obviously a much larger undertaking, as you're not just dealing with your own code but with the underlying web application stack. Perhaps you can convert this app to a PHP based MVC framework like CakePHP, but again, you'd need an experienced PHP developer to do this, and in this case I think this would be a difficult task if they aren't also fairly familiar with Ruby on Rails.

like image 58
Mirko Froehlich Avatar answered Nov 12 '22 16:11

Mirko Froehlich