# [PHP DEV] [Discussion] Native terminal helpers for PHP CLI

- Thread: https://externals.io/message/132523
- Original archive: https://news-web.php.net/php.internals/132523
- Started by Pratik Bhujel on 2026-09-17T04:49:43+00:00
- Messages: 2
- RFC: Io\Terminal (Under discussion) — https://externals.io/rfc/io_terminal.md
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · RFCs at https://externals.io/rfc.md · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #132523 — Pratik Bhujel — 2026-09-17T04:49:43+00:00

URL: https://externals.io/message/132523#132523

Hi Derick,

Wanted to share a quick update since June.

I ended up implementing your stream suggestions in the v0.6.0 and v0.7.0
releases. All methods now accept native stream resources (like STDIN,
STDOUT, STDERR, and php:// streams) directly alongside the enums. I also
published it to Packagist, and installing through PIE works cleanly now. I
also added prebuilt Windows x64 DLLs to the releases so folks on Windows
can test without compiling from source.

My main motivation is still Windows CLI support. Tools like Laravel Prompts
and Symfony Console still drop into dumb text fallbacks on Windows simply
because core has no native raw mode or single key reading primitives.

Now that the PIE package is working across Linux, macOS, and Windows, I
wanted to check if you think this is worth bringing up as an RFC for 8.5 or
8.6, or if it is better to keep gathering feedback through PIE first?

Thanks,
Pratik

---

## #132525 — Larry Garfield — 2026-09-17T13:58:44+00:00

URL: https://externals.io/message/132523#132525 · In reply to: #132523

> Hi Derick,
>
> Wanted to share a quick update since June.
>
> I ended up implementing your stream suggestions in the v0.6.0 and 
> v0.7.0 releases. All methods now accept native stream resources (like 
> STDIN, STDOUT, STDERR, and php:// streams) directly alongside the 
> enums. I also published it to Packagist, and installing through PIE 
> works cleanly now. I also added prebuilt Windows x64 DLLs to the 
> releases so folks on Windows can test without compiling from source.
>
> My main motivation is still Windows CLI support. Tools like Laravel 
> Prompts and Symfony Console still drop into dumb text fallbacks on 
> Windows simply because core has no native raw mode or single key 
> reading primitives.
>
> Now that the PIE package is working across Linux, macOS, and Windows, I 
> wanted to check if you think this is worth bringing up as an RFC for 
> 8.5 or 8.6, or if it is better to keep gathering feedback through PIE 
> first?
>
> Thanks,
> Pratik

At this point it would be an RFC for 8.7, as 8.5 is already released and 8.6 is frozen.

As I've not used it yet I cannot speak to when an RFC would be appropriate.  However, I will note that libraries moving from PECL to php-src in the past have often undergone changes in the process, so they're not a direct transfer/rename.  Whether that is an argument to move it to core sooner or later I leave as an exercise for the reader.  (I could likely argue either way, really.)

--Larry Garfield
