I have a custom build system written in PHP. It is like a make tool that collects source files with dependencies to compile and link them.
It uses a system function to run g ++, for example:
system("g++ -c $file -o $out");
It works great. However, I have a multi-core processor, and I would like to use these additional kernels to speed up the process (for example, make -j 8 ). How can I do this in PHP? I do not need to have multithreading in PHP as such, I just need to create several child processes and wait for them to complete.
source
share