phasync
ProcessRunner / read

Method

ProcessRunner::read

Waits until the stream has something to read, and returns what is there; an empty string at the end of the stream.

Description#

public ProcessRunner::read(
    int $fd = phasync\Util\ProcessInterface::STDOUT
): string|false

Parameters#

$fd int = phasync\Util\ProcessInterface::STDOUT
ProcessInterface::STDOUT or STDERR

Return values#

string|false

Errors / Exceptions#

ExceptionWhen
phasync\IOExceptionIf the stream is closed