stream_isatty

Supported Versions: PHP 7 >= 7.2.0, PHP 8
Check if a stream is a TTY
<?php stream_isatty(resource $stream): bool
<?php     {

        Prompt::setOutput($this->output);



        Prompt::interactive(($input->isInteractive() && defined('STDIN') && stream_isatty(STDIN)) || $this->laravel->runningUnitTests());



        Prompt::validateUsing(fn (Prompt $prompt) => $this->validatePrompt($prompt->value(), $prompt->validate));
<?php         if (function_exists('stream_isatty')) {

            return stream_isatty($fd);

        }
<?php                 || 'xterm' === getenv('TERM');

        }



        return stream_isatty($stream);

    }