blob: cbc539c3234a69137be9e39597d67272f55e5082 (
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
28
29
30
31
|
--TEST--
SplFileObject::fgetcsv() with empty $escape
--FILE--
<?php
$contents = <<<EOS
"cell1","cell2\\","cell3","cell4"
"\\\\\\line1
line2\\\\\\"
EOS;
$file = new SplTempFileObject;
$file->fwrite($contents);
$file->rewind();
while (($data = $file->fgetcsv(',', '"', ''))) {
print_r($data);
}
?>
===DONE===
--EXPECT--
Array
(
[0] => cell1
[1] => cell2\
[2] => cell3
[3] => cell4
)
Array
(
[0] => \\\line1
line2\\\
)
===DONE===
|