- str_repeat: documentation ( source)
- fgetcsv: documentation ( source)
- fwrite: documentation ( source)
- fseek: documentation ( source)
- tmpfile: documentation ( source)
<?php
$fh = tmpfile();
fwrite($fh, str_repeat('x', 8191) . "\r\ny");
fseek($fh, 0);
$i = 0;
while($f = fgetcsv($fh)) {
echo $i++;
}