// the find
goodby/csv
Goodby CSV is a high memory efficient flexible and extendable open-source CSV import/export library for PHP 5.3. 1. Memory Management Free This library designed for memory unbreakable. It will not be accumulated in the memory whole rows. The importer read CSV file and execute callback function line by line. 2. Multibyte support This library supports mulitbyte input/output: for example, SJIS-win, EUC-JP and UTF-8. 3. Ready to Use for Enterprise Applications Goodby CSV is fully unit-tested. The library is stable and ready to be used in large projects like enterprise applications.
A streaming CSV import/export library for PHP that reads and writes row-by-row via a callback/observer pattern instead of loading the whole file into memory. Aimed at people who need to move large CSVs in and out of PHP apps (import to DB, export from DB) without OOM-ing on a big file.
Line-by-line streaming via SplFileObject-style parsing means memory use stays flat regardless of file size, which is the actual selling point and it delivers on it. Built-in charset conversion (SJIS-win, EUC-JP, UTF-8) via a mbstring stream filter is genuinely useful for anyone dealing with Japanese enterprise data exports, a case most CSV libraries ignore. Has both strict and unstrict row-consistency modes, so malformed CSVs with ragged column counts don't just silently corrupt your import. Reasonable test coverage split into unit and join (integration) suites, including PDO-backed import/export tests.
Targets PHP 5.3 - no scalar type hints, no return types, nothing in composer.json suggesting PHP 8 compatibility has been considered, so expect friction or a fork before using this on a current stack. Rows come back as plain indexed arrays with no header-to-associative-array mapping, so you're manually tracking column order everywhere, which gets error-prone on wide CSVs. Last push was 2023-10-09 but commit velocity is low and it's effectively a single-maintainer project (949 stars, 144 forks) - fine for a stable utility, risky if you need a fix. No streaming write support shown for the export side beyond wrapping arrays or PDO statements, so exporting a truly huge result set still means holding a Collection object rather than a real generator/cursor.