phlib/csv

A CSV parsing library; Prevents out of memory errors when parsing large files without a closing string delimiter

2.0.0 2022-08-14 06:15 UTC

This package is auto-updated.

Last update: 2024-11-03 10:02:12 UTC


README

Code Checks Codecov Latest Stable Version Total Downloads Licence

A CSV parsing library; Prevents out of memory errors when parsing large files without a closing string delimiter

Install

Via Composer

$ composer require phlib/csv

Usage

$stream = stream_for(fopen($filename, 'r')); // Must be a *seekable* stream
$csv = new \Phlib\Csv($stream);
foreach ($csv as $row) {
    print_r($row);
}

License

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/.