I recently had to write a PHP CSV parser for a project, and found the built-in fgetcsv
function fairly useless for real-world CSVs (where some fields are
quoted and some aren't for example, or where escaped delimiters or
quotes are present inside the field text).