From: "Robert P. J. Day" on
i'm looking at some existing code that (obviously) reads from stdin:


$fd = fopen("php://stdin", "r");
$source = "";
while (!feof($fd)) {
$source .= fread($fd, 1024);
}
fclose($fd);


it works fine, but is there any reason the original author would have
chosen 1024 as the individual read unit size? from the PHP page for
fread here:

http://ca.php.net/manual/en/function.fread.php

i read that reading with fread() stops after (among other things),
"8192 bytes have been read (after opening userspace stream)." does
that mean that 8192 is the maximum read size you can specify? and
would there be any drawback or value in changing 1024 to 8192? or
would it make so little difference that it doesn't matter? thanks.

rday