summaryrefslogtreecommitdiff
path: root/ext/spl/tests/SplFileObject_fgetcsv_escape_default.phpt
blob: 69089636c11660b207bbd402b73d5d7f38d785db (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
--TEST--
SplFileObject::fgetcsv with default escape character
--FILE--
<?php
$fp = fopen('SplFileObject__fgetcsv7.csv', 'w+');
fwrite($fp, '"aa\"","bb","\"c"');
fclose($fp);

$fo = new SplFileObject('SplFileObject__fgetcsv7.csv');
var_dump($fo->fgetcsv());
?>
--CLEAN--
<?php
unlink('SplFileObject__fgetcsv7.csv');
?>
--EXPECTF--
array(3) {
  [0]=>
  string(4) "aa\""
  [1]=>
  string(2) "bb"
  [2]=>
  string(3) "\"c"
}