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);

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:


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.


PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to