New function stream_isatty()

CLI applications often need to know whether or not they are running in a terminal (TTY), for instance to decide whether output should be generated or what level of verbosity to use. As of PHP 7.2, the stream_isatty() function can be used on any resource type, returning true if the supplied resource is a TTY and false in case it is not.