Before you go, check out these stories!

Hackernoon logoRUBY versus PHP: Who Is The Winner ? by@pavelobod

RUBY versus PHP: Who Is The Winner ?

Author profile picture

@pavelobodPavel Obod

Who would you rather do it with? PHP or Ruby?

A friend may say that everyone builds projects with Ruby language, so you should too.

But would you choose a programming language based solely on your friend’s advice?

I wouldn’t, would you?

It is not like we are buying an ice cream; it’s your business we are talking about!

So, without further ado, let me introduce today’s opponents: Ruby vs PHP.

Usage. PHP or Ruby for web development?

Ruby is perfect for building MVPs, prototypes and e-commerce websites which is why many startuppers choose this particular language. 

For a startup that is just launching it is extremely important to get into their business with a solid MVP which will be promising to scale later on.

PHP is used for the same purposes, however, development with PHP might take a bit more of your time.

Winner: Ruby

Should I learn Ruby or PHP?

Well, both Ruby and PHP offer tons of information on learning, but truth to be told, learning a PHP language is a little bit easier since Ruby is a complex technology.

Very often people who are familiar with coding tend to choose Ruby, but for newbies who are learning Ruby on their own, it can sometimes be challenging to comprehend all the ins and outs.

The tendency of PHP developers springing up like mushrooms is understandable: it is the most commonly learned programming language in the university. Therefore, it is no wonder that the number of developers is increasing year after year.

It is safe to conclude that PHP has a larger pool of developers, whereas it is easier to find skilled workers for Ruby.

Winner: PHP

Cost of development

Since there are so many PHP developers, the competition is pretty high.

Good thing: the hourly rate of PHP developer is lower compared to Ruby.

Bad thing: due to the number of PHP developers that learn this programming language because of its easy learning curve or just because of the hype, the quality of code reduces. 

Unfortunately, choosing PHP as a core programming language can end up costing you more than choosing a more expensive technology.

Winner: Ruby


PHP is more widespread than Ruby. 

One of the factors of popularity is the number of websites built with particular programming languages.

According to Builtwith : there are more than 42M websites created with PHP, whereas the number of websites built with Ruby is around 15K.

The reason for this is that PHP is more often used for small projects and projects where it is advisable to use CMS (for example, WordPress).

However, according to Google trends, the search for PHP has been dropping quite significantly for the past 15 years due to the growth of other back-end technologies like Node.js, Python, and Ruby.

The demand for Ruby, by comparison, has remained stable since 2009. 

Winner: PHP


Both languages appeared in the ’90s and since then launched many updates. 

The last PHP minor update happened in 2019, however, the major update hasn’t happened since 2015. The rumour is that the next major update will happen in 2021. 

Ruby’s update: the Ruby 3.0 is planned for 2020, just around Christmas.

Winner: Tie

PHP vs Ruby performance

To tell you like it is: PHP is much faster due to the language architecture, history and most importantly its philosophy.

PHP vs Ruby speed: The majority projects that are built with PHP are simple and doesn’t consume a lot of memory. It is easier to scale a PHP website since small projects don’t require over-the-top features and don’t take up a lot of memory.

Ruby, on the other hand, takes more memory and has some speed limitations. This programming language focuses on bigger projects that require many customizable features. So, in order to scale your Ruby project, you’d need to use additional tools and integrations.

Winner: PHP

TOP Frameworks

If you are going to build a web app, you will need to use a framework to fulfil your needs.

Ruby on Rails is the most popular framework of Ruby.

PHP has two popular frameworks: Laravel and Symphony.

Ruby on Rails vs Symfony vs Laravel

Ruby on Rails was one of the first frameworks that used the MVC-principle and changed the world of web development.

After presenting this framework, many other programming languages started to integrate this principle into their frameworks. One of the copycats was Laravel.

Ruby on Rails offers lots of libraries, known as ‘gems’ which speed up the development process.

They are a must-have if you are building a large-sized project.

PHP frameworks like Laravel or Symphony offer third-party integrations, but the number of it is incomparable to Rails. 

Based on a comparison of three frameworks, it is understandable to state that Rails is the #1 framework that offers easy to use tools and good documentation.

Winner: Ruby

Round 8: Community

It is the fact that PHP has a bigger community.

Ruby has a more dedicated one. 

Nowadays, there are a few unmixed communities that focus only on Ruby or PHP. It is more common to come across framework communities. 

PHP has more communities due to the number of used frameworks, whereas Ruby on Rails has a more passionate and friendly community.

Winner: Ruby


PHP and Ruby have different philosophies which influence their syntax greatly.

Ruby was developed with the main goal to make coding fun and developers happy.

However, PHP was designed to solve problems.

Ruby’s syntax is clean and beautiful. No one can argue that it is a coding masterpiece and makes development process much faster.

The battle is approaching its end…

AND Winner: THERE IS NO WINNER. Sorry :)

Being in web development over 10 years, I can say there are no bad technologies. There are different technologies and different requirements.

BUT in terms of speed and quick launches Ruby is definitely the First One.

Stay tuned for the next and final fight of Ruby vs PHP vs Python. 


Join Hacker Noon

Create your free account to unlock your custom reading experience.