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_variation13.csv', 'w'); 12 13try { 14 var_dump($fo->fputcsv(array('water', 'fruit'), ',,', '"')); 15} catch (ValueError $e) { 16 echo $e->getMessage(), "\n"; 17} 18 19unset($fo); 20 21echo "Done\n"; 22?> 23--CLEAN-- 24<?php 25$file = __DIR__ . '/SplFileObject_fputcsv_variation13.csv'; 26unlink($file); 27?> 28--EXPECT-- 29*** Testing fputcsv() : with default enclosure & delimiter of two chars *** 30SplFileObject::fputcsv(): Argument #2 ($separator) must be a single character 31Done 32