Hi internals, I've come across a small nuance recently noticing that the fputcsv function isn't compliant with the RFC because it uses LF as a line terminator instead of CRLF as per RFC 4810[1]. There are a few related bug reports already; #42357[4], #46367[2] and #62770[3].
I've created a pull request[5] to address the issue by adding a new parameter that allows a user defined line ending as suggested in bug report #42357[4]. In order to maintain backwards compatibility, fputcsv() still terminates lines with "\n" by default. While my pull request is addressing a bug, adding a new parameter is also a new feature. I'd love to see some opinions from the internals team regarding the best way forward. Kind regards, Cameron [1] https://tools.ietf.org/html/rfc4180 [2] https://bugs.php.net/bug.php?id=46367 [3] https://bugs.php.net/bug.php?id=62770 [4] https://bugs.php.net/bug.php?id=42357 [5] https://github.com/php/php-src/pull/6403