# [Discussion] Native terminal helpers for PHP CLI

- Thread: https://externals.io/message/131974
- Original archive: https://news-web.php.net/php.internals/131974
- Started by Pratik Bhujel on 2026-07-16T15:17:55+00:00
- Messages: 1
- 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

---

## #131974 — Pratik Bhujel — 2026-07-16T15:17:55+00:00

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

Hi Derick,

Thanks, that is helpful.

I have made both changes now. The extension is at v0.6.0:
https://github.com/prateekbhujel/php-terminal/releases/tag/v0.6.0

The stream-aware methods now accept existing PHP stream resources as well
as the enum defaults, so calls can use STDOUT, STDERR, STDIN, or
php://stdout/php://stderr where the underlying stream can be mapped to a
native descriptor/handle. The enum API is still kept as the convenient
default.

I also published it through Packagist for PIE:
pie install prateekbhujel/php-terminal

Thanks again for taking another look.

Regards,
Pratik
