When people criticise the PHP language I think they really miss the point: it is the PHP platform that is really powerful because of:
1. The shared nothing architecture (it really helps you scale).
2. The rapid development cycle.
3. The portability (Apache, IIS, nginx, persistent in-memory interpreters via PHP-FPM...).
4. The huge amount of native C extensions providing amazing functionality.
Sure the language has warts, but who cares when the platform is this powerful?
tl;dr: Too many gotchyas for a beginner. I need discipline imposed on me when I'm learning, ymmv.
In the case of web applications all tend to scale equally well as you can just add another web server. Its the database that causes the scale issues.
With a lightweight PHP framework and a sensibly written app, you can stick to one machine for much longer than you can with Rails, and after that, it will require a fraction of the number of app servers. Beyond that, app processing time is generally much lower without all of that cruft, so you don't need to do as much caching, etc. to get a snappy webpage.
Don't get me wrong though, throwing a bigger hardware box at a problem is a totally viable solution to most problems, up-to a point.