/** * @var int $numProcs The number of worker processes to fork * @var callable $workCallback A callback to call in the child process * once for each line of work to process. * @var resource $input A socket to read work lines from * @var resource $output A socket to write the result of work to. */ public function __construct($numProcs, $workCallback, $input, $output) { parent::__construct($numProcs); $this->workCallback = $workCallback; $this->input = $input; $this->output = $output; }