News for hackers. Stuff that matters.
Re:Never use a dependency that you could replace with an aft... by imtringued on Wednesday August 12, 2020 @06:03AM (#24130245)
Same with CSV. It looks easy, but it isn't. I've never seen anyone who writes their own CSV parser actually implement features necessary to conform to the standard like quoting and escape sequences. The end result is software that breaks when delimiters or quotes appear in user input. Honestly, I prefer xlsx spreadsheets because of that. Nobody fools themselves into implementing the parser or serializer for the format themselves. The only tiny pitfall with them is when people create spreadsheets manually in excel and write numbers as text, but parsing strings to numbers is absolutely trivial. You have to do that with CSV anyway.
Re:Never use a dependency that you could replace with an aft... by withinboredom on Wednesday August 12, 2020 @08:32AM (#24131364)
It really is easy:

$csv = str_getcsv( $input );

But PHP makes everything easy :trollface: