Changeset View
Changeset View
Standalone View
Standalone View
src/filesystem/linesofalarge/LinesOfALargeExecFuture.php
Context not available. | |||||
* Read the output stream of an @{class:ExecFuture} one line at a time. This | * Read the output stream of an @{class:ExecFuture} one line at a time. This | ||||
* abstraction allows you to process large inputs without holding them in | * abstraction allows you to process large inputs without holding them in | ||||
* memory. If you know your inputs fit in memory, it is generally more efficient | * memory. If you know your inputs fit in memory, it is generally more efficient | ||||
* (and certainly simpler) to read the entire input and `explode()` it. For | * (and certainly simpler) to read the entire input and `@explode()` it. For | ||||
* more information, see @{class:LinesOfALarge}. See also | * more information, see @{class:LinesOfALarge}. See also | ||||
* @{class:LinesOfALargeFile} for a similar abstraction that works on files. | * @{class:LinesOfALargeFile} for a similar abstraction that works on files. | ||||
* | * | ||||
Context not available. | |||||
$stdout = $future->readStdout(); | $stdout = $future->readStdout(); | ||||
$future->discardStdoutBuffer(); | $future->discardStdoutBuffer(); | ||||
if (strlen($stdout)) { | if (@strlen($stdout)) { | ||||
return $stdout; | return $stdout; | ||||
} | } | ||||
Context not available. |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0