code.progysm.com

fread

Type:
	function

Syntaxe:
	string fread(resource $handle, int $length)

Example:
// found on stackoverflow:
// pressing arrow key produces 3 $chars
system("stty -icanon");
echo "input# ";
while ($c = fread(STDIN, 1)) {
     echo "Read from STDIN: " . $c . "\ninput# ";
}