Processing Large Files Using PHP

If you want to process large files using PHP, you may use some of the ordinary PHP functions like file_get_contents() or file() which have a limitation when working with very large files.
Memory Limitation
These functions rely on the memory_limit setting in the php.ini file; you may increase the value but these functions still are not suitable for very large files because these functions will put the entire file contents into memory at one point.