Re: [Discussion] Native terminal helpers for PHP CLI
| From: | Derick Rethans | Date: | Tue, 07 Jul 2026 10:15:18 +0000 |
| Subject: | Re: [Discussion] Native terminal helpers for PHP CLI | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-131788@lists.php.net to get a copy of this message | ||
On Thu, 18 Jun 2026, Pratik Bhujel wrote:
> Hi internals,
>
> Quick update: I have continued iterating on this based on the feedback
> here. The extension is now at v0.5.0, still pre-1.0, with the object/enum
> API shape preserved (
Terminal\Terminal,
> Backend, Stream,
> Key) and
> Windows/Linux builds available:
>
>
> https://github.com/prateekbhujel/php-terminal/releases/tag/v0.5.0
>
> I am still treating this as PECL/ecosystem work first rather than proposing
> it for core immediately. Any further feedback on the API shape, missing
> primitives, or Windows behavior would be very welcome.
I have had another look, and I believe the state of the API is now much
nicer than it was when I looked at it first.
I suppose that you might want to have a look at adopting already streams
in PHP (such as php://stdout na php://stderr), but I am not sure how
that could interact.
I guess it makes sense to add it to PIE, as PECL does no longer accept
new packages.
cheers,
Derick
--
https://derickrethans.nl | https://xdebug.org | https://xdebug.cloud
Author of Xdebug. Like it? Consider supporting me: https://xdebug.org/support
mastodon: @derickr@phpc.social @xdebug@phpc.social