Comparison between Php and Ruby? What's the difference? Which is better language?

@markbrown4 , @arout77

i like to hear 2 different opinions. An opinion from a Php-developer, and an opinion from a Ruby-developer. It’s very helpful for me. Honestly.


@arout77 ,
your arguments at your last post are amazing.

First of all, i have some questions sir. If i understood well, you say that :

  1. Php is better for Web Development than Ruby.
  2. Phps’ Flameworks are better than ROR.

Correctly ?

Also, you said that RoR is not better related with PHP + framework . I hope @markbrown4 , did not say his personal preference. I prefer a objective opinion.

Two Personal Questions for You :

  1. Do you believe that Php is better than RoR & Ruby?
  2. Do you believe that RoR will replace Php one day ?

Also, thank you for your opinion about learning first Php and then Python. VERY helpful !


@markbrown4

So, Rubys’ Syntax is better ? and it’s a better designed language ?

Three Personal Questions for You :

  1. Do you believe that RoR is bette than Phpr?
  2. Do you believe that RoR will replace Php one day ?
  3. Do you believe that it’s not worth someone to knows Php ?

Thank you sirs for this nice talk !
Very helpful !

@TomJac.

First of all, i have some questions sir. If i understood well, you say that :

  1. Php is better for Web Development than Ruby.
  2. Phps’ Flameworks are better than ROR.

Correctly ?
Also, you said that RoR is not better related with PHP + framework . I hope @markbrown4 , did not say his personal preference. I prefer a objective opinion.

  1. Yes, PHP is better than just pure Ruby for web development. I don’t think even a die-hard Ruby fan would argue that
  2. This question is much more relevant though, because nobody creates websites in Ruby without a framework (at least that I’m aware of). No, I’m not saying PHP’s frameworks are better. I’m saying that there are a lot of high quality PHP frameworks out there, and one of them is sure to meet your needs. Rails is an amazing framework as well. It greatly influenced the PHP community for the better.
    Call it a tie, because this is too broad and subjective a question.

Two Personal Questions for You :

  1. Do you believe that Php is better than RoR & Ruby?

  2. Do you believe that RoR will replace Php one day ?

  3. As I mentioned earlier, there are times to go with PHP, and there are times to go with RoR. Mawburn presented one scenario above where I feel Ruby is better – creating a very complex website/application. Ruby’s language design and structure makes your life a lot easier in that scenario, for example.
    A lot of people don’t like PHP. And that’s fine. Liking a language is a personal choice. PHP sure as heck does have it’s flaws. But guess what? So does Ruby, Python and every other language out there. That is why so many languages exist. One language cannot do EVERYTHING perfectly, so instead, they generally try to do some specific things very well. Perl is infamous for it’s text handling, among other things. C and C++ are world class system languages. PHP has one priority in mind, web development. And so on. So when you think of it like that, you will see that it is kind of pointless to wonder if one language is better than the other.
    Let me put it another way – an experienced programmer will create a great product in whatever language he chooses…so don’t overthink this too much. Just pick a language, whatever feels good for you, and learn it. Once you are good at it, find another language and learn from that.
    I personally am a C programmer. I chose to learn PHP because I wanted to create websites, without spending too much time worrying about learning the quirks and syntax of a new language, and syntatically, PHP is very, very similiar to C.
    I assume you have no prior experience, so this is all new to you, which is why I say just choose whatever feels easiest for you to learn. You will learn a lot about programming regardless of which you choose.

  4. No. Too many applications already rely on PHP, and shifting the code base to Ruby does not bring enough benefits to make that transition a good decision. Will new sites start using Ruby rather than PHP? Very doubtful. RoR’s popularity has already peaked, and hardly put a dent in PHP’s “market share”. Now Python / Django is a different story…it is having a heck of a resurgence lately. I don’t think anything will “replace” PHP any time soon. But there are a lot of quality options out there. ROR, Django, MEAN, .NET, etc

1 Like

I feel like the importance of the underlying languages has been minimised in this thread. The syntax and how you read and write your program is what you do all day long, this is really really important.

Sinatra and Rails(Both Ruby frameworks) have changed the web for the better, a Sinatra or Rails clone has been created in every programming language because people have realized the strengths of those frameworks and wanted to write code like that in their favourite language. Because of this you can write ‘Rails-like’ code in any language today but you will always be bound to the underlying language. Ruby absolutely destroys PHP here, it’s not just slightly better syntax.

No, Ruby won’t replace PHP, PHP will be around for a long time.

There’s no need to learn PHP these days to get stuff done on the web though, you can use Ruby or Python or Node or C# or … and learn all of the skills you need to get stuff done.

A good web developer knows many languages and can recognize their strengths, I concede that for simple scripted pages on the web PHP is one of the best tools. Most people don’t spend large amounts of time making lots of tiny scripts though, they build more ambitious applications and Ruby on Rails is still one of the very best languages and frameworks for these.

2 Likes

To the folks who were mentioning that the interest in Ruby/Rails is dying and they’re no Ruby jobs.

There is a lot of irony here as today Sitepoint has switched from vBulletin (PHP) to Discourse (JS/Ruby/Rails).

In the post documenting the move Sitepoint mentions they’re a Rails house.

Among thousands of startups, over 90% use Ruby, I haven’t heard of any using PHP.

Please stop spreading disinformation with your asinine comments.

Very unlikely, but it is highly likely PHP will be displaced as the years go by.

I believe its a terrible language to learn as your first programming language. The syntax is cryptic and full of traps.

I would like to see sources indicating that over 90% of startups use Ruby.

I don’t know about 90%, but it’s pretty common knowledge it’s the language of choice for a large majority of startups.

It has for the SitePoint forums. Last week it was written in PHP, this week it is written in RoR.

2 Likes