PHP vs. Ruby

I have been searching for the answer to this for a long time and still do not quite have an answer for this … So to help me decide I set out to write two simple useful programs to find my Google Rank, one written in PHP and the other written in Ruby.

They are both about the same length (~25 lines of code). The Ruby code does not use functions it uses methods (def …) and Ruby does not use curly braces. I did have to cast a number to a string in Ruby via to_s. I also had to import 2 packages in Ruby: 'net/http' and  'uri' which I did not have to do in PHP.

The syntax in Ruby was just a tad easier to read, but  semi-colons and curly braces were about the same as all of the  'end' words I had to use.

So to this point I don't see what the BUZZ is all about. I think it's Rails related…. But as to the language itself, I am not convinced it's really anything new and exciting.

I have heard about DSL, i.e. DOMAIN SPECIFIC LANGUAGES and Ruby and how they are a perfect match. But to mee this just seems like it's still about the syntax. If  Icreate a class in both languages called WebSite, then created two methods one called fetchHome, and another called getGoogleRank, then I would write code like this, website.fetchHome, and website.getGoogleRank (excluding the . for Ruby and the -> from PHP). So again, I don't get it…