Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Short syntax for PHP command line I/O streams
$line = trim(fgets(STDIN));
if(strlen($line) > 0){
} else {
fwrite(STDERR,"An empty line was passed".PHP_EOL);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.