Very often , the problem the OP mentions can be solved by infrastructure and money thrown at hardware , rather than rewriting code. Rewriting code is extremely expensive. Servers are much less expensive and can be deployed very quickly on something like Amazon AWS.
So...
Lets say that due to writing this thing badly in PHP , and because PHP is single threaded , and because making PHP multi-threaded is not that easy , you now have a problem where 150 concurrent users overloads the thing.
Option 1 : Rewrite in another language. Django is a python framework. Rails is a ruby framework. So now , you have to learn another language AND another framework AND rewrite the code. Meh. That will cost a lot , in terms of time or money or both.
DaEvAnAm mentions PHP at 150 concurrent users and Python at 1000 concurrent users on the same badly written code. So , lets say you rewrite in Django or ruby and get 1000 concurrent users.
Result : You get 6x the number of possible concurrent users.
Option 2 : Get a 16 Core processor server with 2 threads per core. You can fire up one in Amazon AWS in 5 minutes to test.
There are cheaper options than AWS , but thats a good start. Deploy a docker image of your PHP/MYSQL server and code. You dont even have to build one.
https://github.com/fauria/docker-lamp for example contains all you need.
Then fire up 32 instances of that docker image and run a load balancer between them (
https://docs.docker.com/docker-cloud/getting-started/deploy-app/9_load-balance_the_service/)
Result : You get 4800 , (32x) the concurrent users without recoding anything.
This scales almost indefinitely. You can have PHP handle as many users as you like with bad code and its single threaded limitation.
Its not the tool per say. Its how you use it.