public function __construct(callable $function, ...$args) { if (!self::enabled()) { throw new UnsupportedError("The pcntl extension is required to create forks."); } $this->function = $function; $this->args = $args; }