When using C or C++, you can write a daemon using the FastCGI Development Kit that can be started and stopped independently of the web server. Because the application is compiled to machine code, the concept of an "intepreter" or "engine" is not applicable - there is only your application. The classic example of such a C/C++ FastCGI program is one that increments an int
for each request and sends this to the web browser to prove that all requests are being handled by a single, persistent process.
However, when using PHP with FastCGI, is this still the case? E.g., is it the case that the PHP engine itself (written in C) persists between requests while your application (written in PHP) does not? Or does the PHP application persist between requests?
If the PHP application persists between requests, is it safe to make use of this feature? I have heard that the PHP engine itself contains memory leaks, which is why it is well suited to one-process-per-request style execution.