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