Damian Jóźwiak has opened an RFC for a dedicated ext/csv module in PHP core. The proposal is documented on the PHP wiki, and implementation work is available in pull request 24199 on GitHub. It builds on Gina Peter Banyard’s girgias/csv extension, released under BSD-3-Clause, and adds file and stream handling. The planned deprecation of SplFileObject CSV methods in PHP 8.6 is one of the proposal’s motivations.
The initial API contains six functions and one class in the Csv\ namespace. Parsing and serialization use RFC 4180-compatible behavior by default. Processing is locale-independent and does not use the proprietary escape mechanism. Delimiters, enclosure characters, and end-of-line sequences may contain multiple bytes. The design supports strict and lax collection parsing. CSV files can be iterated lazily, and the output can be streamed.
PHPT tests cover parsing, serialization, streams, resource lifetime, and edge cases. Continuous integration currently passes on the tested platforms, including debug, ZTS, and AddressSanitizer configurations. A broader object-oriented Reader/Writer API with capability-oriented interfaces remains a possible subject for later discussion. Jóźwiak is seeking feedback on the public API, the name LazyLaxCollection, and whether the extension should always be enabled or remain optional at build time.
Gina Peter Banyard has not reviewed or endorsed the RFC. Jóźwiak says parts of the implementation were developed with LLM assistance, that he reviewed the code, and that he accepts responsibility for the contribution. The message opens a discussion and does not call for a vote.




Comments
No comments yet — be the first.
Open the discussion
No account or password needed — just enter your e-mail and we’ll send you a one-time sign-in link. First time here? You’re set up automatically.
Your rating will be applied automatically after you sign in.
Check your inbox
We’ve sent a sign-in link to …. Open it on this device — this tab will sign you in automatically.
Nothing arrived? Check your spam folder — and mark the mail as "Not spam" so it lands in your inbox next time.