Detect if stdin is a tty device (terminal) or pipe in PHP?

EaUrinnyroplon

New Member
I wrote a php script. I want it show help message when called with standard input connected to a tty device (terminal) before reading and executing interactively, but dont show when called with a file or stream from pipe as standard input.Is there a way to detect this from PHP?
 
Back
Top