I\'ve been arguing with some friends on the university, and we can\'t get to a point to which is the framework with more scalability for web applications (and still very fast).<
Algorithms will count more for scalability than the language used.
That said, there will be differences in execution speed between the languages. I believe that Java (Servlets and JSPs compile to servlets, i.e., native code) will be faster than Ruby and PHP by some amount). There are also a tonne of web frameworks for Java that will encourage you to do things the best way for scalability.
Also design your app so that it can run happily behind a load balancer, and scalability becomes a lot easier :) This isn't my field of expertise however.