4 ms·
I would say no. PHP currently has a speed advantage, and it may be easier to scale, and the Psy shell is a very comfortable REPL. However, PHP as a language is
by canhascodez 8y ago
I would say no. PHP currently has a speed advantage, and it may be easier to scale, and the Psy shell is a very comfortable REPL. However, PHP as a language is somewhat restricted in meta-expression, and the syntax is clunky by comparison. Laravel borrowed a lot of Ruby's Enumerable library, but there are still things that you will miss. Symfony and the Active* ecosystems are probably comparable? I feel like when I'm following the execution of something in Rails, I end up reading a lot of two-line methods whose purpose is not at all apparent from context, and in Laravel, I miss the ability to do absolutely anything in a single line of code. Both languages have pretty comparable web libraries. The Laravel ecosystem is newer, it's slightly less likely that a given package will exist, and it may be buggy. The Rails ecosystem is more mature, it's slightly less likely that a given package will be maintained, and it may be buggy. PHP is almost exclusively targeted at the web, and Ruby is slightly more general-purpose.
If Ruby/Rails is an option, you're sort of baking into the comparison the idea that being expressive at the cost of performance is an adequate tradeoff. Ruby is going to win over PHP on that metric every time. In general, trading performance for expresssivity tends to be good; Rails has succeeded in spite of its performance, not because of it.