1--TEST-- 2SplFileObject::fgetcsv with alternative delimiter 3--FILE-- 4<?php 5$fp = fopen('SplFileObject__fgetcsv3.csv', 'w+'); 6fputcsv($fp, array( 7 'field1', 8 'field2', 9 'field3', 10 5 11), '|'); 12fclose($fp); 13 14$fo = new SplFileObject('SplFileObject__fgetcsv3.csv'); 15try { 16 var_dump($fo->fgetcsv('invalid')); 17} catch (ValueError $e) { 18 echo $e->getMessage(), "\n"; 19} 20?> 21--CLEAN-- 22<?php 23unlink('SplFileObject__fgetcsv3.csv'); 24?> 25--EXPECT-- 26SplFileObject::fgetcsv(): Argument #1 ($separator) must be a single character 27