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

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

whiteplus/csv
=============

Multibyte-Text supported CSV reader and writer

1.3.0(6y ago)07.6k1MITPHP

Since Oct 1Pushed 2y ago6 watchersCompare

[ Source](https://github.com/WHITEPLUS/php-csv)[ Packagist](https://packagist.org/packages/whiteplus/csv)[ Docs](http://www.wh-plus.com)[ RSS](/packages/whiteplus-csv/feed)WikiDiscussions master Synced 1mo ago

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

Keboola CSV reader/writer [![Build Status](https://camo.githubusercontent.com/449e85a7f8617d1652fdda3a416bee3759c3e9d88acb6d0ee8e9eaada5131a99/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f6b65626f6f6c612f7068702d6373762e706e67)](http://travis-ci.org/keboola/php-csv)
=======================================================================================================================================================================================================================================================================================

[](#keboola-csv-readerwriter-)

[![Latest Stable Version](https://camo.githubusercontent.com/6ffafb32e2ecd4756ecbe140479f2032eaf2e48a3f827fb99e9edf25d3fea18c/68747470733a2f2f706f7365722e707567782e6f72672f6b65626f6f6c612f6373762f762f737461626c652e737667)](https://packagist.org/packages/keboola/csv)[![License](https://camo.githubusercontent.com/69318da48c1f22b642933483326116ce4d8f1a19cd8daf1bb077bf7a47776dee/68747470733a2f2f706f7365722e707567782e6f72672f6b65626f6f6c612f6373762f6c6963656e73652e737667)](https://packagist.org/packages/keboola/csv)[![Total Downloads](https://camo.githubusercontent.com/8bb28b3f768318e15e632150050d423d74c242deeb2fcfb11d06033368562fca/68747470733a2f2f706f7365722e707567782e6f72672f6b65626f6f6c612f6373762f646f776e6c6f6164732e737667)](https://packagist.org/packages/keboola/csv)

Usage
-----

[](#usage)

### Read CSV

[](#read-csv)

```
$csvFile = new Whiteplus\Csv\CsvFile(__DIR__ . '/_data/test-input.csv');
foreach($csvFile as $row) {
	var_dump($row);
}
```

### Write CSV

[](#write-csv)

```
$csvFile = new Keboola\Csv\CsvFile(__DIR__ . '/_data/test-output.csv');
$rows = array(
	array(
		'col1', 'col2',
	),
	array(
		'line without enclosure', 'second column',
	),
);

foreach ($rows as $row) {
	$csvFile->writeRow($row);
}
```

Installation
------------

[](#installation)

Library is available as composer package. To start using composer in your project follow these steps:

**Install composer**

```
curl -s http://getcomposer.org/installer | php
mv ./composer.phar ~/bin/composer # or /usr/local/bin/composer
```

**Create composer.json file in your project root folder:**

```
{
    "require": {
        "php" : ">=5.3.2",
        "whiteplus/csv": "1.2.*"
    }
}
```

**Install package:**

```
composer install
```

**Add autoloader in your bootstrap script:**

```
require 'vendor/autoload.php';
```

Read more in [Composer documentation](http://getcomposer.org/doc/01-basic-usage.md)

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~167 days

Recently: every ~535 days

Total

16

Last Release

2476d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/37e87e151950de5287603ba60e70f0f6c9694b5be141301327c5e453875220f7?d=identicon)[white-plus](/maintainers/white-plus)

---

Top Contributors

[![Halama](https://avatars.githubusercontent.com/u/903531?v=4)](https://github.com/Halama "Halama (26 commits)")[![ngmy](https://avatars.githubusercontent.com/u/864041?v=4)](https://github.com/ngmy "ngmy (20 commits)")[![kaizoa](https://avatars.githubusercontent.com/u/34592?v=4)](https://github.com/kaizoa "kaizoa (3 commits)")[![shinichiromasuo](https://avatars.githubusercontent.com/u/43429112?v=4)](https://github.com/shinichiromasuo "shinichiromasuo (2 commits)")[![yamakii](https://avatars.githubusercontent.com/u/2669756?v=4)](https://github.com/yamakii "yamakii (2 commits)")[![mike182uk](https://avatars.githubusercontent.com/u/991592?v=4)](https://github.com/mike182uk "mike182uk (1 commits)")[![barnabywalters](https://avatars.githubusercontent.com/u/968350?v=4)](https://github.com/barnabywalters "barnabywalters (1 commits)")[![atushi-koga](https://avatars.githubusercontent.com/u/20272076?v=4)](https://github.com/atushi-koga "atushi-koga (1 commits)")

---

Tags

csvphpphp-library

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[spatie/browsershot

Convert a webpage to an image or pdf using headless Chrome

5.2k32.1M102](/packages/spatie-browsershot)[barryvdh/laravel-snappy

Snappy PDF/Image for Laravel

2.8k24.8M48](/packages/barryvdh-laravel-snappy)[openspout/openspout

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

1.2k57.6M131](/packages/openspout-openspout)[keboola/csv

Keboola CSV reader and writer

1451.8M21](/packages/keboola-csv)[setasign/tfpdf

This class is a modified version of FPDF that adds UTF-8 support. The latest version is based on FPDF 1.85.

426.1M30](/packages/setasign-tfpdf)[aspera/xlsx-reader

Spreadsheet reader library for XLSX files

52742.2k5](/packages/aspera-xlsx-reader)

PHPackages © 2026

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