1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 16:22:37 +01:00
Files
archived-php-src/ext/spl/tests/SplFileObject/bug62004.phpt
2022-05-27 18:33:48 +01:00

18 lines
308 B
PHP

--TEST--
Bug #62004 (SplFileObject: fgets after seek returns wrong line)
--FILE--
<?php
$f = new SplFileObject(__DIR__ . '/bug62004.txt');
$f->setFlags(SplFileObject::SKIP_EMPTY);
$f->seek(0);
echo $f->fgets();
$f->seek(1);
echo $f->fgets();
$f->seek(2);
echo $f->fgets();
?>
--EXPECT--
Line 1
Line 2
Line 3