blob: f8c14f0e35e41b1a4b5bdefde0f97cd17e42041e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
--TEST--
SplFileObject::fgetcsv with alternative delimiter
--FILE--
<?php
$fp = fopen('SplFileObject__fgetcsv5.csv', 'w+');
fputcsv($fp, array(
'field1',
'field2',
'field3',
5
), ',', '"');
fclose($fp);
$fo = new SplFileObject('SplFileObject__fgetcsv5.csv');
var_dump($fo->fgetcsv(',', 'invalid'));
?>
--CLEAN--
<?php
unlink('SplFileObject__fgetcsv5.csv');
?>
--EXPECTF--
Warning: SplFileObject::fgetcsv(): enclosure must be a character in %s on line %d
bool(false)
|