# What is the equivalent of \<lang\>'s \<feature\> in ruby?

**URL:** <https://www.ruby-forum.com/t/what-is-the-equivalent-of-lang-s-feature-in-ruby/165479>\
**Category:** Ruby\
**Created:** [April 14, 2009, 11:51am UTC](https://www.ruby-forum.com/t/what-is-the-equivalent-of-lang-s-feature-in-ruby/165479 "2009-04-14T11:51:51Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Daniel\_DeLorme](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/9d8465/32.png) [@Daniel\_DeLorme](https://www.ruby-forum.com/u/Daniel_DeLorme)\
**Post date:** [April 14, 2009, 11:51am UTC](https://www.ruby-forum.com/t/what-is-the-equivalent-of-lang-s-feature-in-ruby/165479/1 "2009-04-14T11:51:51Z")

</div>

Is there a website that documents which method in ruby is equivalent to  
which function in PHP? Or any other programming language? I could swear  
something like this has been posted to this list before, but I couldn’t  
find any trace of it.

---

<div class="post-metadata">

**Author:** ![Daniel\_DeLorme](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/9d8465/32.png) [@Daniel\_DeLorme](https://www.ruby-forum.com/u/Daniel_DeLorme)\
**Post date:** [April 14, 2009, 1:50pm UTC](https://www.ruby-forum.com/t/what-is-the-equivalent-of-lang-s-feature-in-ruby/165479/2 "2009-04-14T13:50:59Z")

</div>

On Apr 14, 5:51 am, Daniel DeLorme [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Is there a website that documents which method in ruby is equivalent to  
> which function in PHP? Or any other programming language? I could swear  
> something like this has been posted to this list before, but I couldn’t  
> find any trace of it.

A simple function translation will result in PHP written in ruby  
syntax. It’s far better to learn idiomatic ruby. ri and irb are your  
friends.

---

<div class="post-metadata">

**Author:** ![Daniel\_DeLorme](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/9d8465/32.png) [@Daniel\_DeLorme](https://www.ruby-forum.com/u/Daniel_DeLorme)\
**Post date:** [April 14, 2009, 2:47pm UTC](https://www.ruby-forum.com/t/what-is-the-equivalent-of-lang-s-feature-in-ruby/165479/3 "2009-04-14T14:47:31Z")

</div>

> Is there a website that documents which method in ruby is equivalent to  
> which function in PHP? Or any other programming language? I could swear  
> something like this has been posted to this list before, but I couldn’t  
> find any trace of it.

There’s this from the official site:  
[http://www.ruby-lang.org/en/documentation/ruby-from-other-languages/](http://www.ruby-lang.org/en/documentation/ruby-from-other-languages/)

Covers PHP, C, Java and a few others.

Chris

---

<div class="post-metadata">

**Author:** ![Daniel\_DeLorme](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/9d8465/32.png) [@Daniel\_DeLorme](https://www.ruby-forum.com/u/Daniel_DeLorme)\
**Post date:** [April 14, 2009, 2:54pm UTC](https://www.ruby-forum.com/t/what-is-the-equivalent-of-lang-s-feature-in-ruby/165479/4 "2009-04-14T14:54:30Z")

</div>

Give this site a try: [http://railsforphp.com/](http://railsforphp.com/)

---

<div class="post-metadata">

**Author:** ![Daniel\_DeLorme](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/9d8465/32.png) [@Daniel\_DeLorme](https://www.ruby-forum.com/u/Daniel_DeLorme)\
**Post date:** [April 15, 2009, 2:10pm UTC](https://www.ruby-forum.com/t/what-is-the-equivalent-of-lang-s-feature-in-ruby/165479/5 "2009-04-15T14:10:24Z")

</div>

Javier Alvarez wrote:

> Give this site a try: [http://railsforphp.com/](http://railsforphp.com/)

Thank you, that’s a nice little website. The function reference is  
not exactly extensive, but it’s a very good start. One of the nice  
things is that it explains the ruby idioms equivalent to a given  
PHP function. So there goes your objection, Mr. Thomas 😛

Now if only there was a website like that to assist ruby programmers  
trying to code in, say, OCaml.

Daniel
