PHPackages                             bolstad/csv-parser - 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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. bolstad/csv-parser

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

bolstad/csv-parser
==================

Simple system for parsing CSV-files row by row and sending the data to a callback

0.2.3(8y ago)01271MITPHPPHP &gt;=5.3.0

Since Jul 23Pushed 2y ago1 watchersCompare

[ Source](https://github.com/bolstad/csvparser)[ Packagist](https://packagist.org/packages/bolstad/csv-parser)[ RSS](/packages/bolstad-csv-parser/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (7)DependenciesVersions (11)Used By (0)

CsvParser for PHP
=================

[](#csvparser-for-php)

Introduction
------------

[](#introduction)

A simple system for parsing CSV-files row by row and sending the data to a callback function.

Example
-------

[](#example)

```
  use CsvParser\Simple;

  function handler ( $data ) {
  	print_r( $data );
  }

  /*

  Parameters for parseRowByRow:

   * @param string  $filename  File to parse
	 * @param string  $callback  Callback function to send data to
	 * @param int     $line      Length - Must be greater than the longest line (in characters) to be found in the CSV file (allowing for trailing line-end characters).
	 * @param str     $delimiter Set the field delimiter (one character only).
	 * @param str     $enclosure Set the field enclosure character (one character only)
	 * @param type    $escape    Set the escape character (one character only). Defaults as a backslash.
     * @param bool    $autoDetectHeader Try to auto detect header rows - if false, line 1 i always used
	 * @return bool
 */

  Simple::parseRowByRow('file.csv' ,'handler');
```

History
-------

[](#history)

2014-07-23 Ver 0.1.3 - Quick hack, initial release 2015-08-27 Ver 0.1.4 - Updated README with example code 2018-03-02 Ver 0.2.3 - Attempt to auto detect if first row of file doesn't have the correct header info. 2024-03-05 Ver 0.3.0 - Removed `auto_detect_line_endings`as it is deprecated

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity54

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

Every ~188 days

Recently: every ~230 days

Total

8

Last Release

2999d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0ec058cc342db8fb862c97b2276cddd2127047ad6972140cbad9bff146a8825d?d=identicon)[bolstad](/maintainers/bolstad)

---

Top Contributors

[![bolstad](https://avatars.githubusercontent.com/u/62787?v=4)](https://github.com/bolstad "bolstad (23 commits)")

### Embed Badge

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

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

###  Alternatives

[mtdowling/jmespath.php

Declaratively specify how to extract elements from a JSON document

2.0k472.8M135](/packages/mtdowling-jmespathphp)[opis/closure

A library that can be used to serialize closures (anonymous functions) and arbitrary data.

2.6k230.0M284](/packages/opis-closure)[masterminds/html5

An HTML5 parser and serializer.

1.8k242.8M229](/packages/masterminds-html5)[sabberworm/php-css-parser

Parser for CSS Files written in PHP

1.8k191.2M65](/packages/sabberworm-php-css-parser)[michelf/php-markdown

PHP Markdown

3.5k52.4M345](/packages/michelf-php-markdown)[jms/metadata

Class/method/property metadata management in PHP

1.8k152.8M88](/packages/jms-metadata)

PHPackages © 2026

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