After adding ndjson converter to league/csv I thought it would be nice to create a small utility package to help writing and reading ndjson in PHP. So aide-ndjson was created.
The package provides namespaced functions for quick usage ndjson_encode, ndjson_decode , ndjson_read and ndjson_write. A Codec class is also present if you want to fine tune how you handle reading and/or writing NDJSON documents. Just like league/csv the Codec supports large files via streaming and mapping and/or formatting your data via callback to improve data conversion.
[link] [comments]






![The Gang Republic: Inside Haiti’s New Order (2026) - ~3 million people living in the grips of all-out gang war. France24 spent a fortnight filming in and around the Haitian capital, speaking to a population held hostage by this drawn-out crisis (CC) [00:52:38]](https://external-preview.redd.it/0j1B98qWy2MAsjLEwjT10EbknBToMVuWRJ-tUeZsTso.jpeg?width=320&crop=smart&auto=webp&s=041d55dee546ef807e7eda2e0d1d013111f02a25)

English (US) ·