I have to read CSV files line by line which can be 10 to 20 Meg. file() is useless and I have to find the quickest way.
I have tried with fgets(), which runs fine, but I don't know if it reads a small block each time I call it, or if it caches a bigger one and optimize file I/O.
Do I have to try the fread() way, parsing EOL by myself?
You ought to be using fgetcsv() if possible.
Otherwise, there is always fgets().
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With