xref: /PHP-8.1/ext/spl/tests/gh9883.phpt (revision 6fbf81c6)
1--TEST--
2Bug GH-9883 (SplFileObject::__toString() reads next line)
3--FILE--
4<?php
5$file_stream = new SplFileObject(__FILE__, 'rb');
6
7echo $file_stream; // line 4
8echo $file_stream; // line 5
9echo $file_stream; // line 6
10echo $file_stream; // line 7
11echo $file_stream; // line 8
12echo $file_stream; // line 9
13?>
14--EXPECT--
15<?php
16<?php
17<?php
18<?php
19<?php
20<?php
21