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. There are a few related bug reports
already; #42357, #46367 and #62770.
I've created a pull request to address the issue by adding a new
parameter that allows a user defined line ending as suggested in bug report
#42357. In order to maintain backwards compatibility,
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.