Re: [RFC] Io\Terminal
| From: | Tim Düsterhus | Date: | Tue, 01 Dec 2026 09:50:00 +0000 |
| Subject: | Re: [RFC] Io\Terminal | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-133270@lists.php.net to get a copy of this message | ||
Hi
On 2026-12-01 10:34, Rob Landers wrote:
I'm not sure where you got that impression from, but no, this is not what I am suggesting. The RFC is already quite clear in that hitting just “Enter” will return an empty string (notIt is not clear to me whyI really hopereadLine()returnsnullon EOF instead of throwing. This is inconsistent withreadSecret()as the closest relative (since it also reads entire lines), and breaks the pattern in the try-catch example in the “Error Model” section.readLine()doesn't throw on someone pressing [enter] ... that doesn't feel "exceptional" to me.
null). I'm expecting the Exception on a real EOF (e.g. when the underlying physical terminal is closed).
Best regards
Tim Düsterhus