Method
ProcessRunner::write
Waits until the stream can take data, and writes as much as it takes; false if the process is not running.
Description#
public ProcessRunner::write(
string $data,
int $fd = phasync\Util\ProcessInterface::STDIN
): int|falseParameters#
- $data string
- What to write
- $fd int = phasync\Util\ProcessInterface::STDIN
ProcessInterface::STDIN
Return values#
The number of bytes written, which may be less than all of $data int|false
Errors / Exceptions#
| Exception | When |
|---|---|
phasync\IOException | If the stream is closed |