PHPackages                             alva/csv-each - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. alva/csv-each

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

alva/csv-each
=============

Line by line read csv file

1.0(7y ago)015MITPHPPHP &gt;=7.1

Since Dec 24Pushed 7y agoCompare

[ Source](https://github.com/evgeny-klyopov/csv-each)[ Packagist](https://packagist.org/packages/alva/csv-each)[ Docs](https://klepov.info)[ RSS](/packages/alva-csv-each/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (1)Versions (3)Used By (0)

CSV Each
========

[](#csv-each)

[![Version](https://camo.githubusercontent.com/a49dd8fc6dc289282259e0619af764e3b6096382796042bb87b00f9c6404fb88/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616c76612f6373762d656163682e737667)](https://packagist.org/packages/alva/csv-each)[![License](https://camo.githubusercontent.com/1aa38ce419c493f6c49aa979ab3624a086c162a6f8a3fd5c51c7341a0f7a79ce/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f616c76612f6373762d656163682e737667)](https://github.com/evgeny-klyopov/csv-each/blob/master/LICENSE)[![Downloads](https://camo.githubusercontent.com/acb12be691f178675949fc3e79b7b58eaef4313a98618b4483766cf052dd7b49/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f616c76612f6373762d656163682e737667)](https://packagist.org/packages/alva/csv-each)[![StyleCI](https://camo.githubusercontent.com/ba59cc5aefb19fcbcd20f5bd842a25c1cd3e488af67a80d9460da09d28f5bbee/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3136323630333439342f736869656c643f6272616e63683d6d6173746572)](https://github.styleci.io/repos/162603494)

### Features:

[](#features)

- PHP &gt;=7.1
- **stable**
- **fast** Minimal overhead

Install
-------

[](#install)

```
composer require alva/csv-each:1.*
```

```
{
    "require": {
        "alva/csv-each": "1.*"
    }
}
```

Examples
========

[](#examples)

### Line by line reading

[](#line-by-line-reading)

```
use Alva\CsvEach\Iterate;

foreach ((new Iterate($pathToFile))->each(Iterate::TYPE_TEXT) as $lineNumber => $line) {
    echo '[' . $lineNumber . '] ' . $line . PHP_EOL;
}
```

### Line by line reading and return columns

[](#line-by-line-reading-and-return-columns)

```
use Alva\CsvEach\Iterate;

foreach ((new Iterate($pathToFile))->setDelimiter(',')->each(Iterate::TYPE_ARRAY) as $lineNumber => $line) {
    echo '[' . $lineNumber . '] ' . PHP_EOL;
    print_r($line);
}
```

### Byte read

[](#byte-read)

```
use Alva\CsvEach\Iterate;

foreach ((new Iterate($pathToFile))->each(Iterate::TYPE_BINARY, 5) as $lineNumber => $line) {
    echo '[' . $lineNumber . '] ' . $line . PHP_EOL;
}
```

Tests
-----

[](#tests)

```
./vendor/bin/phpunit
```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

2699d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ef91d563ea69e4a25d017b3c260fd769d3fcb3afa258187dce10c2efd65828f2?d=identicon)[mail@klepov.info](/maintainers/mail@klepov.info)

---

Top Contributors

[![evgeny-klyopov](https://avatars.githubusercontent.com/u/29359457?v=4)](https://github.com/evgeny-klyopov "evgeny-klyopov (9 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

PHPackages © 2026

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