# Code conversion tool

**URL:** <https://www.ruby-forum.com/t/code-conversion-tool/76198>\
**Category:** Rails\
**Created:** [March 3, 2006, 12:34pm UTC](https://www.ruby-forum.com/t/code-conversion-tool/76198 "2006-03-03T12:34:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ror-user](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/22d042/32.png) [@ror-user](https://www.ruby-forum.com/u/ror-user)\
**Post date:** [March 3, 2006, 12:34pm UTC](https://www.ruby-forum.com/t/code-conversion-tool/76198/1 "2006-03-03T12:34:16Z")

</div>

Hi  
is there any tool / utility which can convert code from php to ruby ?  
thanks

---

<div class="post-metadata">

**Author:** ![ror-user](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/22d042/32.png) [@ror-user](https://www.ruby-forum.com/u/ror-user)\
**Post date:** [March 3, 2006, 12:51pm UTC](https://www.ruby-forum.com/t/code-conversion-tool/76198/2 "2006-03-03T12:51:12Z")

</div>

rohit mehra wrote:

> Hi  
> is there any tool / utility which can convert code from php to ruby ?  
> thanks

If such a tool existed, it could at best convert small snippets, and it  
wouldn’t be real Ruby code, it wold be PHP with Ruby syntax.

---

<div class="post-metadata">

**Author:** ![ror-user](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/22d042/32.png) [@ror-user](https://www.ruby-forum.com/u/ror-user)\
**Post date:** [March 10, 2006, 5:15pm UTC](https://www.ruby-forum.com/t/code-conversion-tool/76198/3 "2006-03-10T17:15:07Z")

</div>

Andreas S. wrote:

> rohit mehra wrote:
> 
> > Hi  
> > is there any tool / utility which can convert code from php to ruby ?  
> > thanks
> 
> If such a tool existed, it could at best convert small snippets, and it  
> wouldn’t be real Ruby code, it wold be PHP with Ruby syntax.

in Theory this tool can be exist.

---

<div class="post-metadata">

**Author:** ![ror-user](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/22d042/32.png) [@ror-user](https://www.ruby-forum.com/u/ror-user)\
**Post date:** [March 12, 2006, 4:52am UTC](https://www.ruby-forum.com/t/code-conversion-tool/76198/4 "2006-03-12T04:52:47Z")

</div>

What would be the point if it didn’t generate real Ruby code?

---

<div class="post-metadata">

**Author:** ![ror-user](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/22d042/32.png) [@ror-user](https://www.ruby-forum.com/u/ror-user)\
**Post date:** [March 13, 2006, 11:15am UTC](https://www.ruby-forum.com/t/code-conversion-tool/76198/5 "2006-03-13T11:15:20Z")

</div>

Tristan Havelick wrote:

> What would be the point if it didn’t generate real Ruby code?  
> I think the point is that it would be code that would happily run in the  
> Ruby interpreter, but would be written with all PHP’s idioms, not taking  
> advantage of any of Ruby’s niceness.

–  
Alex
