How does pcntl_fork work in PHP?

PCNTL can not make threads. It only “forks” current PHP process. What does it mean? When you call pcntl_fork(), current process is split into two processes. Whole namespace of parent process is copied into the child and both processes continue with execution in parallel with only one difference: pcntl_fork() returns child’s PID in parent and … Read more