There are 3 ways to use PHP with web servers:
First of all, if you have a multithreaded server you should only use a thread-safe build of PHP. But there are more things to be taken into consideration, if you select one out of these 3 variants. CGI is simple to use, the PHP interpreter runs in an own process, i.e. cannot crash the server but there are several potential security risks, which need to be avoided carefully. Furthermore running the interpreter in an own process space consumes more system resources and there's significant process creation overhead on some platforms. ISAPI runs the PHP interpreter in a DLL, i.e. within the server process. This is a very small and fast interface but an ISA filter/extension may crash the server (although IIS is capable to serve ISA extensions/filters in separate process space, Pi³Web isn't). A PHP SAPI module has similar characteristics as ISAPI, additionally it can be optimized for a specific server. The Pi³Web SAPI module is very similar to an ISAPI implementation.