PHP file() vs fopen()+fgets() performance debate
问题 I am in process of rewriting some scripts to parse machine generated logs from perl to php The files range from 20mb~400mb I am running into this problem to decide if I should use file() or fopen()+fgets() combo to go through the file for some faster performance. Here is the basic run through, I check for file size before opening it, and if file is larger than 100mb(pretty rare case, but it does happen from time to time) I will go the fopen+fgets route since I only bumped the memory limit for