Concurency

Concurrency is a concept in computing where multiple tasks are in progress at the same time.

PHP uses several ways to handle concurency:

  • externally, by the webserver or PHP-fpm

  • internally, with forked processes, with pcntl

  • internally, with threads, with parallel

  • cooperating, with fibers

  • non/blocking IO, with swoole or amphp.

Documentation

See also FrankenPHP, swoole, openswoole, AMPHP, Understanding Concurrency in PHP, Understanding Fibers in PHP: A New Way to Handle Concurrency and PHP is 5x Faster Than NestJS? Rethinking High-Load with Swoole.

Related : Thread, Process, Asynchronous, FastCGI Process Manager (FPM), Atomic Operation, file_put_contents()