I have 9 GB MSSQL file. I want to count lines of the file. I add the following code:
$lines = file('db.sql');
echo count($lines);
I got the following error:
Fatal error: Out of memory (allocated 398458880) (tried to allocate 396361752 bytes) in C:\xampp\htdocs\import\read-line-by-line.php on line 3