The Swoft framework encapsulates a set of frequent operations, replacing PHP's pcntl, PHP's own pcntl, and there are many deficiencies, such as:

  • Pcntl does not provide the function of interprocess communication
  • Pcntl does not support redirecting standard input and output
  • Pcntl only provides the original interface such as fork, easy to use error

Swoft operates on a Swoole-based process with the same functionality as Swoole. Developers are advised to use Sofft's wrapper operations to facilitate iterative upgrades. 2.0.4+ support and need to install the swoft-process component

Method list

All operations in the method, all in the Swoft\Process\Process

  • __construct
  • Start
  • Name
  • Exec