Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. PHP
  3. CSV

CSV

MITPHP9.28.0

A lightweight PHP library for efficient CSV parsing, writing, and transformation with a straightforward API.

Visit WebsiteGitHubGitHub
3.5k stars346 forks0 contributors

What is CSV?

League CSV is a PHP library that makes CSV data manipulation easy, providing tools for parsing, writing, and filtering CSV files. It solves the problem of handling CSV data efficiently in PHP applications, especially with large datasets, by offering a memory-efficient and scalable approach. The library also supports transforming CSV into other formats like JSON, XML, and HTML.

Target Audience

PHP developers who need to work with CSV data in their applications, such as those building data import/export features, ETL pipelines, or reporting tools. It's suitable for both small projects and large-scale systems requiring performance.

Value Proposition

Developers choose League CSV for its straightforward API, memory efficiency, and flexibility without heavy dependencies. It stands out by being framework-agnostic, fully tested, and leveraging PHP's native capabilities for optimal performance.

Overview

CSV data manipulation made easy in PHP

Use Cases

Best For

  • Parsing large CSV files without exhausting memory
  • Building data import/export functionality in PHP applications
  • Transforming CSV data into JSON, XML, or HTML formats
  • Filtering and querying CSV records with complex conditions
  • Integrating CSV processing with PHP stream filters
  • Creating framework-agnostic CSV utilities in PHP projects

Not Ideal For

  • Projects requiring direct manipulation of Excel files (XLS/XLSX) without conversion to CSV
  • Applications needing real-time, continuous data streaming from non-file sources
  • Teams seeking a graphical user interface for CSV editing without writing code
  • Environments with PHP versions below 7.0.10, due to strict version requirements

Pros & Cons

Pros

Memory-Efficient Stream Processing

Uses PHP streams to handle large CSV files scalably, preventing memory exhaustion as highlighted in the documentation for reading and writing.

Flexible Query and Mapping

Offers robust filtering and array-to-object mapping capabilities, enabling complex data manipulation without extra dependencies.

Multi-Format Transformation

Converts CSV data into JSON, XML, or HTML outputs, simplifying integration with various systems, as noted in the features.

Comprehensive Testing and Docs

Fully documented with a dedicated website and unit-tested, ensuring reliability and ease of use for developers.

Cons

PHP Extension Dependency

Requires the ext-filter extension, which may not be enabled in all PHP installations, adding a setup step that isn't always straightforward.

Configuration for Edge Cases

Needs manual ini settings for legacy Macintosh line endings and faces deprecation warnings in PHP 8.4, complicating setup and maintenance.

Limited to CSV Format

Focuses solely on CSV files, lacking built-in support for other common data formats like Excel or databases, which may require additional libraries.

Frequently Asked Questions

Quick Stats

Stars3,472
Forks346
Contributors0
Open Issues2
Last commit5 days ago
CreatedSince 2013

Tags

#stream-processing#data-export#csv-parsing#memory-efficient#file-io#csv#php#framework-agnostic#data-manipulation

Built With

P
PHPStan
P
PHP
P
PHPUnit
P
PHP CS Fixer

Links & Resources

Website

Included in

PHP32.5k
Auto-fetched 1 day ago

Related Projects

FlysystemFlysystem

Abstraction for local and remote filesystems

Stars13,562
Forks848
Last commit1 month ago
PHP FFmpegPHP FFmpeg

An object oriented PHP driver for FFMpeg binary

Stars5,005
Forks898
Last commit3 months ago
GaufretteGaufrette

PHP library that provides a filesystem abstraction layer − will be a feast for your files!

Stars2,471
Forks355
Last commit7 months ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub