PHP pthreads extension
Since the year 2000, PHP can be compiled as thread safe, which allows any process to run multiple instances of the PHP interpreter in multiple threads (one thread per PHP interpreter). Each PHP interpreter has its own isolated context which doesn't share any data (the "share nothing" philosophy) with others.
This is commonly used in web servers such as Apache (depending on its modules). Apache creates multiple subprocesses where each subprocess runs multiple threads with multiple PHP interpreters. Running interpreters in threads instead of subprocesses has its advantages and disadvantages.
Creating only threads is significantly faster and doesn't consume as much memory as creating subprocesses.
An obvious disadvantage is isolation. Even though all PHP interpreters run independently in threads, if any of them causes, for example, a "segmentation fault" error, then the entire process and all of its threads are terminated immediately. This even includes threads that didn...