Note that this function can also be used to parse other types of constructions. For example, I have used to parse .htaccess AddDescription lines:
AddDescription "My description to the file." filename.jpg
Those lines can be parsed like this:
<?php
$line = 'AddDescription "My description to the file." filename.jpg';
$parsed = str_getcsv(
$line, ' ', '"', '\\' );
var_dump( $parsed );
?>
The output:
array(3) {
[0]=>
string(14) "AddDescription"
[1]=>
string(27) "My description to the file."
[2]=>
string(12) "filename.jpg"
}