I think an important thing to note here is that Rails is an web application framework for the Ruby programming language whereas PHP is just a programming language (with a few framework-ish features like session management).You could see similar productivity benefits by using a good PHP framework.