My boss was looking down on me about learning Ruby because "It's just a PHP generator" which I can't find anything about it being so. Is this the case?

I understand that the Rails framework can be used to generate PHP code, but isn't Ruby in-and-of-itself its own programming language?

  • 4
    Rails generates PHP code? Really? I wouldn't know, I'm not even a Ruby guy, much less a Rails guy, but it seems completely pointless and way too complicated (both to do and to get right).
    – user7043
    Commented Sep 28, 2011 at 15:46
  • Perl influenced both PHP and Ruby, other than that, I don't see the two being related outside of similar problem domains.
    – user28988
    Commented Sep 28, 2011 at 16:55
  • 2
    I sympathize with your plight there, but this seems like a question that could've been answered with just a little bit of research. This feels off-topic to me for this site.
    – Adam Lear
    Commented Sep 28, 2011 at 16:58
  • 6
    I'm sorry, but really? The Wikipedia article in particular seems to be fairly comprehensive and proves that Ruby is its own language.
    – Adam Lear
    Commented Sep 28, 2011 at 17:00
  • 1
    @AnnaLear: I get that it's a softball question, but it isn't that hard for us to answer with a yes or no including a link for more info. At least some thoughtful responders got in before the question was slapped down. Commented Sep 28, 2011 at 17:33

5 Answers 5


Dilbert's principle in action.

No, ruby isn't a PHP generator. It is a language that has nothing to do with PHP except some usages.

  • 4
    LOL i have a funnier addition for you: she's the owner and CEO o.0 Commented Sep 28, 2011 at 15:47
  • 4
    The higher up they are, the more Dilbert's principle applies. Commented Sep 28, 2011 at 15:50
  • 2
    @mechaflash let me guess: it's a small shop, and it pretends to be a corporate-thingie.
    – ZJR
    Commented Sep 28, 2011 at 15:59

Ruby is a full-fledged language.

As far as the statement made by your boss is concerned, if Ruby is "just a PHP generator," then so is C, Java, C#, Clojure, etc.

Ruby is a good language because it you can express things in the Functional Paradigm (for example, Ruby has lambdas).

Learn Ruby. It will change how you see problems.:)

  • PHP now have lambda and closure. In a far futur, his boos may be right ! We are all DOOOOOOMED !
    – deadalnix
    Commented Sep 28, 2011 at 16:03
  • I wasn't aware that PHP had closures or lamdbas. Thanks for the tip.:) Commented Sep 28, 2011 at 16:13
  • It is new in PHP5.3 . PHP didn't had this feature before.
    – deadalnix
    Commented Sep 28, 2011 at 16:23

Yes. Ruby is in-and-of-itself its own programming language


Ruby is...

A dynamic, open source programming language with a focus on simplicity and productivity.


I understand that the Rails framework can be used to generate PHP code

That's not generally true. I suppose somebody somewhere may have made this happen, but their mental health problems would not be insignificant.

In general, Rails applications are written in a mixture of languages underpinned by Ruby, the others including HTML, CSS, Javascript. While HTML may be replaced by, for example, HAML, and Javascript (recently) by Coffeescript, with compilation steps occurring as needed, I've never seen Ruby being "compiled" down to PHP.

Ruby and PHP both appeared at about the same time, according to Wikipedia (here and here). Ruby was a fairly general-purpose scripting language that erupted into the Web World with the advent of Rails in 2004, whereas AFAIK, PHP was designed for web development.

  • 1
    Someone actually did make this (well, Ruby to PHP, anyway) happen. Fructose generator: fructoselang.org
    – cczona
    Commented Sep 28, 2011 at 18:06

One point nobody has mentioned - if Ruby were a PHP generator (spoiler alert - it's not), who cares? C is "just an assembly generator", so I guess we should look down on people who learn C.

  • The sad thing is that people used to do that for a long time.
    – user7043
    Commented Sep 28, 2011 at 17:24
  • 1
    I guess the differentiatior here is that (at least, to me) ruby and php occupy a space on the same level of abstraction from the machine, which would be redundant. Commented Sep 28, 2011 at 17:30
  • 1
    @SnOrfus - I think we should all have a think about CoffeeScript now. ;)
    – ocodo
    Commented Sep 29, 2011 at 2:49
  • nonsense, my processor runs C directly! Commented Feb 22, 2013 at 20:58

Not the answer you're looking for? Browse other questions tagged or ask your own question.