title: str_getcsv does not parse data properly when escape character is found exactly before enclosure
body: <p>I need to parse csv string as array. I am using php str_getcsv() it works fine until I found below case.</p>
  
  <pre><code>$line = 'field1,field2,field3,"this is field having backslash at end\",anothersomeval';
  $arrField = str_getcsv($line, ",", '"');
  echo count($arrField);
  </code></pre>
  
  <p>So I expected count should be 5 but its showing 4 actually.
  I did google for this issue but could not find any proper solution.
  I doubt it is problem with str_getcsv() though I am not able to find any bug report on this.</p>
  
  <p><strong>I need to use proper csv parsing mechanism and I cannot split values based on field delimiter or just explode the string.</strong></p>
  
  <p>Any help on where I am going wrong with above code?</p>