1--TEST-- 2fgetcsv() with empty $escape 3--FILE-- 4<?php 5$contents = <<<EOS 6"cell1","cell2\\","cell3","cell4" 7"\\\\\\line1 8line2\\\\\\" 9EOS; 10$stream = fopen('php://memory', 'w+'); 11fwrite($stream, $contents); 12rewind($stream); 13while (($data = fgetcsv($stream, 0, ',', '"', '')) !== false) { 14 print_r($data); 15} 16fclose($stream); 17?> 18--EXPECT-- 19Array 20( 21 [0] => cell1 22 [1] => cell2\ 23 [2] => cell3 24 [3] => cell4 25) 26Array 27( 28 [0] => \\\line1 29line2\\\ 30) 31