note 130543 added to function.stream-isatty
| From: | frmphp@dyadic.org | Date: | Thu, 13 Nov 2025 15:25:57 +0000 |
| Subject: | note 130543 added to function.stream-isatty | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-222417@lists.php.net to get a copy of this message | ||
This function returns False (output is being redirected) regardless of the form of redirection. On
Windows, both of these are redirected:
- php.exe script.php > outFle.txt
- php.exe script.php | Tee outFle.txt
In the second case, Tee causes the redirection to also echo to the console.
An edge usage is: in debugging a long-running script, output is wanted both in a file for later
review and also in the console so it's visible in real time. But if the script alters its
output based on this function, then in the second case it will produce output as if for redirection
only, even though Tee enables console output.
----
Server IP: 45.112.84.4
Probable Submitter: 45.112.84.18 (proxied: 199.38.181.250)
----
Manual Page -- https://php.net/manual/en/function.stream-isatty.php
Edit -- https://main.php.net/note/edit/130543
Del: integrated -- https://main.php.net/note/delete/130543/integrated
Del: useless -- https://main.php.net/note/delete/130543/useless
Del: bad code -- https://main.php.net/note/delete/130543/bad+code
Del: spam -- https://main.php.net/note/delete/130543/spam
Del: non-english -- https://main.php.net/note/delete/130543/non-english
Del: in docs -- https://main.php.net/note/delete/130543/in+docs
Del: other reasons-- https://main.php.net/note/delete/130543
Reject -- https://main.php.net/note/reject/130543
Search -- https://main.php.net/manage/user-notes.php