I know that PHP code is compiled to the bytecode and reexecuted on every run (i.e. on every page request). So engine should redefine all used classes, functions, variables, etc. on every request.
When using full-stack frameworks like Laravel or CakePHP this also means that on every request the same bootstrapping work is done again and again, like parsing configuration files, registering routes, autoloading classes, etc.
This seems to be very unoptimal way of handling such stuff. And even caching, be it OPcache or framework caching system, is not helpful enough, because script still needs to be executed.
On the other hand, application based on engines like NodeJS or Ruby compiled and bootstrapped only once during startup. So I imagine they should have better scalability than PHP.
But PHP is so popular and even Facebook uses it. So I wonder, what is the right choice for a website that may experience heavy load? Is using PHP with full-stack framework for such purpose a bad idea?