xref: /PHP-7.4/ext/standard/tests/file/bug22382.phpt (revision 26dfce7f)
1--TEST--
2Bug #22382 (fgetcsv() does not handle escaped quotes correctly)
3--FILE--
4<?php
5$fp = fopen(__DIR__."/test2.csv", "r");
6while(($line = fgetcsv($fp, 1024))) {
7	var_dump($line);
8}
9fclose($fp);
10?>
11--EXPECT--
12array(6) {
13  [0]=>
14  string(3) "One"
15  [1]=>
16  string(7) "\"Two\""
17  [2]=>
18  string(7) "Three\""
19  [3]=>
20  string(4) "Four"
21  [4]=>
22  string(2) "\\"
23  [5]=>
24  string(28) "\\\\\\\\\\\\\\\\\\\\\\\"\\\\"
25}
26