public function __construct($commandline, $cwd = null, array $env = null, $input = null, $timeout = 60, array $options = [])
{
if (!function_exists('proc_open')) {
throw new \RuntimeException('The Process class relies on proc_open, which is not available on your PHP installation.');
}
$this->commandline = $commandline;
$this->cwd = $cwd;
if (null === $this->cwd && (defined('ZEND_THREAD_SAFE') || '\\' === DS)) {
$this->cwd = getcwd();
}
if (null !== $env) {
$this->setEnv($env);
}
$this->input = $input;
$this->setTimeout($timeout);
$this->useFileHandles = '\\' === DS;
$this->pty = false;
$this->enhanceWindowsCompatibility = true;
$this->enhanceSigchildCompatibility = '\\' !== DS && $this->isSigchildEnabled();
$this->options = array_replace(['suppress_errors' => true, 'binary_pipes' => true], $options);
}