1--TEST--
2Test fputcsv() : usage variations - with enclosure & delimiter of two chars
3--FILE--
4<?php
5
6/* Testing fputcsv() to write to a file when default enclosure value and delimiter
7   of two chars is provided and file is opened in read only mode */
8
9echo "*** Testing fputcsv() : with enclosure & delimiter of two chars and file opened in read mode ***\n";
10
11$fo = new SplFileObject(__DIR__ . '/SplFileObject_fputcsv_variation14.csv', 'w');
12
13var_dump($fo->fputcsv(array('water', 'fruit'), ',,', '""'));
14
15unset($fo);
16
17echo "Done\n";
18?>
19--CLEAN--
20<?php
21$file = __DIR__ . '/SplFileObject_fputcsv_variation14.csv';
22unlink($file);
23?>
24--EXPECTF--
25*** Testing fputcsv() : with enclosure & delimiter of two chars and file opened in read mode ***
26
27Warning: SplFileObject::fputcsv(): enclosure must be a character in %s on line %d
28bool(false)
29Done
30