A CSV parsing library; Prevents out of memory errors when parsing large files without a closing string delimiter
Via Composer
$ composer require phlib/csv
$stream = stream_for(fopen($filename, 'r')); // Must be a *seekable* stream
$csv = new \Phlib\Csv($stream);
foreach ($csv as $row) {
print_r($row);
}
This package is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this program. If not, see http://www.gnu.org/licenses/.