It's quite complicated to understand its movements. But it determines if the file_descriptor is open AND connected to a terminal.
Thus, while receiving data from the STDIN, for example, it will return false.
This move is useful to optionally pipe STDIN to a PHP script, to avoid hanging when nothing is from STDIN.
<?php
// Simply echoes the contents from STDIN if any
// and "no stdin" if not.
echo (posix_isatty(STDIN)) ? 'no stdin' . PHP_EOL : file_get_contents('php://stdin');
?>