Comparing PHP and Ruby is like comparing Apples and Oranges. There is no clear cut better programming language; each language has its strengths and weaknesses. As a developer it is important to choose technology based on the problem at hand.

Most people don’t realise that Ruby is as old as PHP. However, it was not until 2005 that the Rails library was added to complete the Ruby on Rails framework. Therefore in essence Ruby on Rails is a more modern technology that has been influenced by web languages before it (such as PHP), to strengthen weaknesses within the web development industry.

So by logic, does this make Ruby on Rails the superior web technology to use?

Unfortunately it is not so black and white, and many variables come into play when determining if PHP or ruby on rails should be used to develop with.

For instance, Ruby on Rails is a much more complex language to setup a development environment in. Consequently, the tacit knowledge required for Ruby immediately jacks up the price in the programming market compared to PHP development. A PHP developer on the other hand can simply use a conventional package such as WAMP, MAMP to get their dev environment setup in under 5 minutes.

This is where PHP’s strengths start to emerge

Packages like this have are widely available as PHP has been around longer than Ruby on Rails and as a consequence has been able to solidify itself as a trustworthy, dependable language in the development community. Thus features like pre-built development environments are catered for, enabling varying skill levels to dive right into PHP development with less struggle and greatly reducing the cost of development time and budget.

PHP has proven itself time and time again as a language powerful enough to get the job done, from small business CMS websites to large enterprise solutions such as Facebook, PHP will not fail to get a solution built in time and on cost. Because of this strong base, the PHP active community has grown from humble beginnings to a gigantic community. The documentation and support available for PHP towers above the minimal documentation currently available for Ruby on Rails.

Ruby was built to solve the issues of speed of development, and elegance of code that other languages did not, applying the DRY (do no repeat yourself) principle and MVC method. However, is it a better option to gamble with the expensive skills of a Ruby on Rails developer and pray they have the knowledge already to develop quickly, or go with a more affordable PHP developer backed by a strong support community, and numerous frameworks that now apply the DRY principle and MVC methods onto PHP? This is the difficulty when tossing up whether to develop in PHP or Ruby.

Ruby on Rails developers need to have the skills for effective development

There is no debate that Ruby on Rails is a more difficult language to develop in and the skills required to justify the increased cost. However, this does not guarantee that the developer will be at a skill level that they can build a solution in an efficient manner, and in any way different to what a PHP developer would create. There is a lot of “buzz” surrounding Ruby on Rails as an up and coming web language but of course with anything new, there will be teething problems, and it is important to consider this later down the track when your project changes developers. Will there be affordable Rails developers available that can pick up where the last developer left off? There might be, but there will always be a PHP developer ready.

One thing is for certain there is a high demand for PHP developers and a vast supply of skilled developers out there. 21% of developer jobs on the popular US site Craigslist were for PHP projects, and in 2011 PHP developers were found on a total of 18,950 LinkedIn profiles, compared to only 138 job listings for ruby on rails and only 720 rails developers found on LinkedIn.

It will not be until Rails has matured like a fine wine like PHP that it can be measured as a better, reliable programming language. It’s current support base, skill shortage and expense still poses somewhat of a risk to any new start-up thinking about developing in Ruby on Rails, in my humble opinion.