1
0
mirror of https://github.com/php/php-src.git synced 2026-03-26 09:12:14 +01:00
Files
archived-php-src/ext/spl/tests/SplFileObject_fgetcsv_basic.phpt
George Peter Banyard 79a283240e Revert "Fix GH-8563 Different results for seek() on SplFileObject and SplTempFileObject"
Although the fix is partially correct it also breaks long standing behaviour which has been produced since PHP 5.3.

This reverts commit 6f87a5c633.
2022-07-05 21:28:59 +01:00

32 lines
474 B
PHP

--TEST--
SplFileObject::fgetcsv default path
--FILE--
<?php
$fp = fopen('SplFileObject__fgetcsv1.csv', 'w+');
fputcsv($fp, array(
'field1',
'field2',
'field3',
5
));
fclose($fp);
$fo = new SplFileObject('SplFileObject__fgetcsv1.csv');
var_dump($fo->fgetcsv());
?>
--CLEAN--
<?php
unlink('SplFileObject__fgetcsv1.csv');
?>
--EXPECT--
array(4) {
[0]=>
string(6) "field1"
[1]=>
string(6) "field2"
[2]=>
string(6) "field3"
[3]=>
string(1) "5"
}