function Process::getIncrementalOutput
Returns the output incrementally.
In comparison with the getOutput method which always return the whole output, this one returns the new output since the last call.
Throws
LogicException in case the output has been disabled
LogicException In case the process is not started
File
-
vendor/
symfony/ process/ Process.php, line 616
Class
- Process
- Process is a thin wrapper around proc_* functions to easily start independent PHP processes.
Namespace
Symfony\Component\ProcessCode
public function getIncrementalOutput() : string {
$this->readPipesForOutput(__FUNCTION__);
$latest = stream_get_contents($this->stdout, -1, $this->incrementalOutputOffset);
$this->incrementalOutputOffset = ftell($this->stdout);
if (false === $latest) {
return '';
}
return $latest;
}