Why is there no popular php server?

I do not ask for this to start the troll, but it starts with observation. Each programming language has its own server, which increases their productivity.

Ruby have Mongrel , Thin , Python has many frameworks with built-in servers (ready for production or not), for example, Django , Tornado , etc. And don't mention java!

Currently, the PHP code is served using servers such as Apache or NGinx, but I mean the “ preliminary environment ”: If we take an example on the Tornado web server, the idea can be used, for example, to download the entire “meta-” structures at server startup: A database connection created once and only once , the URL interpreter with the entire regular expression url, the basic structure, is loaded only once to save the server processor. Then the code “executed relative to the request” will be executed upon request.

The main reason for this idea is to save the PHP code loaded once to reduce server load for each request and improve response time.

Of course, many (if not all) actual PHPs could not work, and the equivalent of a garbage collector would be needed to unload all unused code.

Writing it in PHP is a basic idea, since it would be (sort of) related to a loaded component (web framework), but the server could be written in any other language. The main goal is to download all PHP code only once when the server starts.

Do you have a good reason not to do this? Did I forget something? Maybe there is already something that I did not know about?

+3
source share

All Articles