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