Skip to content

Instantly share code, notes, and snippets.

@rsky
Created February 6, 2011 22:02
Show Gist options
  • Save rsky/813761 to your computer and use it in GitHub Desktop.
Save rsky/813761 to your computer and use it in GitHub Desktop.
posix_isatty()でファイルディスクリプタが端末か判定する
% php -r 'var_dump(posix_isatty(2));'
bool(true)
% php -r 'var_dump(posix_isatty(2));' 2>/dev/null
bool(false)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment