PHPackages                             polisadov/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. polisadov/csv

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

polisadov/csv
=============

Csv data manipulation made easy in PHP

9.1.3(8y ago)014.7k2MITPHPPHP &gt;=7.0.10

Since Dec 3Pushed 4y agoCompare

[ Source](https://github.com/polisadov/csv)[ Packagist](https://packagist.org/packages/polisadov/csv)[ Docs](http://csv.thephpleague.com)[ RSS](/packages/polisadov-csv/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (5)Versions (49)Used By (0)

CSV
===

[](#csv)

[![Latest Version](https://camo.githubusercontent.com/cdd45b8f7b58a15ccdff03e934a13b39f515c8082ff6ce444d1b8cb0cf1f6dc6/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f7468657068706c65616775652f6373762e7376673f7374796c653d666c61742d737175617265)](https://github.com/thephpleague/csv/releases)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/c1442f7a9a2450ac2553e91cf761115662b2a81151a47eac8d124677627b7279/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f7468657068706c65616775652f6373762f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/thephpleague/csv)[![Coverage Status](https://camo.githubusercontent.com/8092fde7922ed5f1d093f520cc08ab66abd9166335f3ac0f4b5774f7b175dac4/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f7468657068706c65616775652f6373762e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/thephpleague/csv/code-structure)[![Quality Score](https://camo.githubusercontent.com/6f9d8034657350241fa64f621a25731958bca34fafed81c523ad3c83e5dc283d/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f7468657068706c65616775652f6373762e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/thephpleague/csv)[![Total Downloads](https://camo.githubusercontent.com/adfdb4bc1efb69e07b322dadbbe0430365ae5c31d4dc52e49b0fd60a108fdfb2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c65616775652f6373762e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/league/csv)

Csv is a simple library to ease CSV parsing, writing and filtering in PHP. The goal of the library is to be powerful while remaining lightweight, by utilizing PHP native classes whenever possible.

Highlights
----------

[](#highlights)

- Simple API
- Read and Write to CSV documents in a memory efficient and scalable way
- Use SPL to interact with the CSV documents
- Support PHP Stream filtering capabilities
- Transform CSV documents into popular format (JSON, XML or HTML)
- Fully documented
- Fully unit tested
- Framework-agnostic
- Composer ready, [PSR-2](http://www.php-fig.org/psr/psr-2/) and [PSR-4](http://www.php-fig.org/psr/psr-4/) compliant

Documentation
-------------

[](#documentation)

Full documentation can be found at [csv.thephpleague.com](https://csv.thephpleague.com).

System Requirements
-------------------

[](#system-requirements)

You need **PHP &gt;= 7.0.10** and the `mbstring` extension to use `Csv` but the latest stable version of PHP is recommended.

Install
-------

[](#install)

Install `Csv` using Composer.

```
$ composer require league/csv

```

Configuration
-------------

[](#configuration)

**Warning:** If your CSV document was created or is read on a Macintosh computer, add the following lines before using the library to help [PHP detect line ending](http://php.net/manual/en/function.fgetcsv.php#refsect1-function.fgetcsv-returnvalues).

```
if (!ini_get("auto_detect_line_endings")) {
    ini_set("auto_detect_line_endings", '1');
}
```

Testing
-------

[](#testing)

`League\Csv` has a :

- a [PHPUnit](https://phpunit.de) test suite
- a coding style compliance test suite using [PHP CS Fixer](http://cs.sensiolabs.org/).
- a code analysis compliance test suite using [PHPStan](https://github.com/phpstan/phpstan).

To run the tests, run the following command from the project folder.

```
$ composer test
```

Contributing
------------

[](#contributing)

Contributions are welcome and will be fully credited. Please see [CONTRIBUTING](.github/CONTRIBUTING.md) and [CONDUCT](CONDUCT.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [ignace nyamagana butera](https://github.com/nyamsprod)
- [All Contributors](https://github.com/thephpleague/csv/graphs/contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [LICENSE](LICENSE) for more information.

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor1

Top contributor holds 95.8% 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 ~60 days

Recently: every ~314 days

Total

47

Last Release

1764d ago

Major Versions

5.4.0 → 6.0.02014-08-28

6.3.0 → 7.0.02015-02-19

7.2.0 → 8.0.02015-12-11

8.2.2 → 9.0.02017-08-18

8.2.3 → 9.1.32018-03-12

PHP version history (3 changes)1.0.0PHP &gt;=5.4.0

8.0.0PHP &gt;=5.5.0

9.0.0PHP &gt;=7.0.10

### Community

Maintainers

![](https://www.gravatar.com/avatar/70475a55ceed628efd9f6550808a73cb933b27c7fa5a86096a9bd63b159499d9?d=identicon)[polisadov](/maintainers/polisadov)

---

Top Contributors

[![nyamsprod](https://avatars.githubusercontent.com/u/51073?v=4)](https://github.com/nyamsprod "nyamsprod (701 commits)")[![GrahamCampbell](https://avatars.githubusercontent.com/u/2829600?v=4)](https://github.com/GrahamCampbell "GrahamCampbell (5 commits)")[![duncan3dc](https://avatars.githubusercontent.com/u/546811?v=4)](https://github.com/duncan3dc "duncan3dc (3 commits)")[![btmash](https://avatars.githubusercontent.com/u/109608?v=4)](https://github.com/btmash "btmash (2 commits)")[![hannesvdvreken](https://avatars.githubusercontent.com/u/1410358?v=4)](https://github.com/hannesvdvreken "hannesvdvreken (2 commits)")[![HeyRatFans](https://avatars.githubusercontent.com/u/1496909?v=4)](https://github.com/HeyRatFans "HeyRatFans (1 commits)")[![Jalle19](https://avatars.githubusercontent.com/u/1106133?v=4)](https://github.com/Jalle19 "Jalle19 (1 commits)")[![jblotus](https://avatars.githubusercontent.com/u/382230?v=4)](https://github.com/jblotus "jblotus (1 commits)")[![kboduch](https://avatars.githubusercontent.com/u/3485537?v=4)](https://github.com/kboduch "kboduch (1 commits)")[![kronthto](https://avatars.githubusercontent.com/u/17156142?v=4)](https://github.com/kronthto "kronthto (1 commits)")[![leomarquine](https://avatars.githubusercontent.com/u/17835448?v=4)](https://github.com/leomarquine "leomarquine (1 commits)")[![lookyman](https://avatars.githubusercontent.com/u/3863468?v=4)](https://github.com/lookyman "lookyman (1 commits)")[![mfrost503](https://avatars.githubusercontent.com/u/660067?v=4)](https://github.com/mfrost503 "mfrost503 (1 commits)")[![pborreli](https://avatars.githubusercontent.com/u/77759?v=4)](https://github.com/pborreli "pborreli (1 commits)")[![polisadov](https://avatars.githubusercontent.com/u/29985731?v=4)](https://github.com/polisadov "polisadov (1 commits)")[![sagikazarmark](https://avatars.githubusercontent.com/u/1226384?v=4)](https://github.com/sagikazarmark "sagikazarmark (1 commits)")[![Samyoul](https://avatars.githubusercontent.com/u/5702426?v=4)](https://github.com/Samyoul "Samyoul (1 commits)")[![shameerc](https://avatars.githubusercontent.com/u/275500?v=4)](https://github.com/shameerc "shameerc (1 commits)")[![AC-TimRourke](https://avatars.githubusercontent.com/u/15127748?v=4)](https://github.com/AC-TimRourke "AC-TimRourke (1 commits)")[![vlakarados](https://avatars.githubusercontent.com/u/386678?v=4)](https://github.com/vlakarados "vlakarados (1 commits)")

---

Tags

exportcsvfilterimportreadwrite

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[league/csv

CSV data manipulation made easy in PHP

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

Supercharged Excel exports and imports in Laravel

12.7k144.3M712](/packages/maatwebsite-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)[shuchkin/simplecsv

Parse and retrieve data from CSV files. Export data to CSV.

5192.4k](/packages/shuchkin-simplecsv)[handcraftedinthealps/goodby-csv

CSV import/export library

441.6M4](/packages/handcraftedinthealps-goodby-csv)

PHPackages © 2026

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