Is there anyway to read from STDIN with PHP that is non blocking:
STDIN
I tried this:
stream_set_blocking(STDIN, false); echo fread(STDIN, 1);
system('stty cbreak'); while(true){ if($char = fread(STDIN, 1)) { echo chr(8) . mb_strtoupper($char); } }