Method
ProcessRunner::__construct
Starts the process.
Description#
public ProcessRunner::__construct(
array $command,
?string $cwd = null,
?array $env = null
)Parameters#
- $command array
- The executable and its arguments, one element each
- $cwd ?string = null
- The working directory of the child; null: the current one
- $env ?array = null
- The environment of the child, replacing the current one; null: inherit it
Errors / Exceptions#
| Exception | When |
|---|---|
RuntimeException | If the command is not found or not executable, or cannot be started |
LogicException | On Windows before PHP 8.3 |