Re: [RFC] Io\Terminal

From: Date: Fri, 20 Nov 2026 09:51:59 +0000
Subject: Re: [RFC] Io\Terminal
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-133136@lists.php.net to get a copy of this message
Hi Tim, Thanks for taking another look. I’ll hold off on the November 24 vote. On reading the current raw-mode settings: you’re right, PHP can read them again. I was wrong about that. The question for me is what a yes or no would mean if echo is off but Ctrl+C still generates a signal. There’s also a separate question for readLine(): does PHP hold a lease? Reading the native settings doesn’t tell us that. I’d leave the getter out for now and explain the distinction in the RFC. On handling EOF separately: I’ll add a TerminalException subclass so callers can handle the end of input without also catching an unrelated I/O error. readLine() will keep returning null at EOF as it does now. On the property name: agreed. I’ll use $columns for both the property and the constructor parameter. On future Key cases: your Ctrl+Left example makes sense. An application could already be handling those bytes itself. Even if it has a fallback for unknown enum cases, its existing Ctrl+Left handler would stop matching. I’ll make clear in the RFC that changing a sequence from a string to a Key case is a compatibility change. I’ll post v0.7 here once the RFC and implementation are updated. Regards, Pratik

« previous php.internals (#133136) next »