Skip to content

Commit 62cbfd0

Browse files
committed
docs: add readAll() usage
1 parent bcea11b commit 62cbfd0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

README.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -510,8 +510,11 @@ $reader->readPiped();
510510
// Pass in a callback for if STDIN is empty
511511
// The callback recieves $reader instance and MUST return string
512512
$reader->readPiped(function ($reader) {
513-
// Wait to read!
513+
// Wait to read a line!
514514
return $reader->read();
515+
516+
// Wait to read multi lines (until Ctrl+D pressed)
517+
return $reader->readAll();
515518
});
516519
```
517520

0 commit comments

Comments
 (0)