PHPackages                             phlib/csv - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [PDF &amp; Document Generation](/categories/documents)
4. /
5. phlib/csv

ActiveLibrary[PDF &amp; Document Generation](/categories/documents)

phlib/csv
=========

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

2.0.0(3y ago)4371LGPL-3.0PHPPHP ^7.4 || ^8.0CI passing

Since Sep 1Pushed 1y ago4 watchersCompare

[ Source](https://github.com/phlib/csv)[ Packagist](https://packagist.org/packages/phlib/csv)[ RSS](/packages/phlib-csv/feed)WikiDiscussions main Synced 2mo ago

READMEChangelog (4)Dependencies (4)Versions (5)Used By (0)

phlib/csv
=========

[](#phlibcsv)

[![Code Checks](https://camo.githubusercontent.com/733abe764f852ecb077c54f21a60929f5740cdf7097bb8a167700aa0f42932f3/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f70686c69622f6373762f636f64652d636865636b732e796d6c3f6c6f676f3d676974687562)](https://github.com/phlib/csv/actions/workflows/code-checks.yml)[![Codecov](https://camo.githubusercontent.com/6ac4617191ee6b92666b7892e99f3321115becd38981b43d48ffe87d632cac77/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f70686c69622f6373762e7376673f6c6f676f3d636f6465636f76)](https://codecov.io/gh/phlib/csv)[![Latest Stable Version](https://camo.githubusercontent.com/2efcbe3a14fd9794c6fc4c9d05219c36384fb1c3ec28150b8ee7ef897f673cad/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f70686c69622f6373762e7376673f6c6f676f3d7061636b6167697374)](https://packagist.org/packages/phlib/csv)[![Total Downloads](https://camo.githubusercontent.com/dda5897781baa4699c740e01a0c77a40d70bc358e8fff2927e981bd2905ea0ac/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f70686c69622f6373762e7376673f6c6f676f3d7061636b6167697374)](https://packagist.org/packages/phlib/csv)[![Licence](https://camo.githubusercontent.com/35f52486f924529cdf2d932c4c2a4f303abd54b8adb5212047562a9b54955455/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f70686c69622f6373762e737667)](https://camo.githubusercontent.com/35f52486f924529cdf2d932c4c2a4f303abd54b8adb5212047562a9b54955455/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f70686c69622f6373762e737667)

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

Install
-------

[](#install)

Via Composer

```
$ composer require phlib/csv
```

Usage
-----

[](#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
-------

[](#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 .

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance32

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor1

Top contributor holds 94.1% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~724 days

Total

4

Last Release

1370d ago

Major Versions

0.0.1 → 1.0.02017-02-23

1.0.1 → 2.0.02022-08-14

PHP version history (2 changes)0.0.1PHP ^5.5 || ^7.0

2.0.0PHP ^7.4 || ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/135b7ddf9ec91c412e1b18174f81d1ad2bef66e732624195c156717c96b13731?d=identicon)[letssurf](/maintainers/letssurf)

![](https://www.gravatar.com/avatar/10c53cdcfb3a6d299820aecb993521cc1a972baa09fd8f31d2468908cded7e1d?d=identicon)[chrisminett](/maintainers/chrisminett)

---

Top Contributors

[![chrisminett](https://avatars.githubusercontent.com/u/1084019?v=4)](https://github.com/chrisminett "chrisminett (48 commits)")[![jdempster](https://avatars.githubusercontent.com/u/10297?v=4)](https://github.com/jdempster "jdempster (2 commits)")[![awhale](https://avatars.githubusercontent.com/u/6044970?v=4)](https://github.com/awhale "awhale (1 commits)")

---

Tags

csv

###  Code Quality

TestsPHPUnit

Code StyleECS

### Embed Badge

![Health badge](/badges/phlib-csv/health.svg)

```
[![Health](https://phpackages.com/badges/phlib-csv/health.svg)](https://phpackages.com/packages/phlib-csv)
```

###  Alternatives

[maatwebsite/excel

Supercharged Excel exports and imports in Laravel

12.7k144.3M712](/packages/maatwebsite-excel)[gotenberg/gotenberg-php

A PHP client for interacting with Gotenberg, a developer-friendly API for converting numerous document formats into PDF files, and more!

3685.2M19](/packages/gotenberg-gotenberg-php)[league/csv

CSV data manipulation made easy in PHP

3.5k166.1M646](/packages/league-csv)[rap2hpoutre/fast-excel

Fast Excel import/export for Laravel

2.3k24.9M47](/packages/rap2hpoutre-fast-excel)[openspout/openspout

PHP Library to read and write spreadsheet files (CSV, XLSX and ODS), in a fast and scalable way

1.1k57.6M131](/packages/openspout-openspout)[goodby/csv

CSV import/export library

9555.6M23](/packages/goodby-csv)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
