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