1--TEST-- 2Test fputcsv() : usage variations - with default 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 */ 8 9echo "*** Testing fputcsv() : with default enclosure & delimiter of two chars ***\n"; 10 11$fo = new SplFileObject(__DIR__ . '/SplFileObject_fputcsv.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.csv'; 22unlink($file); 23?> 24--EXPECTF-- 25*** Testing fputcsv() : with default enclosure & delimiter of two chars *** 26 27Warning: SplFileObject::fputcsv(): delimiter must be a character in %s on line %d 28bool(false) 29Done 30