Pratik Bhujel has submitted an RFC for Io\Terminal, a proposed API for PHP 8.7. It would place a compact terminal interface in ext/standard. The planned capabilities cover terminal sessions, native terminal-size queries, raw mode with safe restoration, normalized key input, and hidden input.
The proposal follows an earlier php-internals discussion about native terminal helpers. Symfony Console and TUI integration helped focus the core on functionality that needs cross-platform native support. The RFC also consolidates earlier discussion whose replies were split across separate archive threads.
A reference implementation already exists as ext-terminal, distributed through PIE and Packagist under prateekbhujel/php-terminal. A draft php-src implementation is available in pull request 23941. The draft follows the reduced core API and omits the full ext-terminal 1.x surface.
The core design uses Time\Duration for timeout values. It has no public constructor and initially excludes compatibility aliases, environment-based terminal-size fallbacks, and convenience APIs. Bhujel is asking for feedback before the vote.




Comments
No comments yet — be the first.
Open the discussion
No account or password needed — just enter your e-mail and we’ll send you a one-time sign-in link. First time here? You’re set up automatically.
Your rating will be applied automatically after you sign in.
Check your inbox
We’ve sent a sign-in link to …. Open it on this device — this tab will sign you in automatically.
Nothing arrived? Check your spam folder — and mark the mail as "Not spam" so it lands in your inbox next time.