xref: /PHP-8.3/ext/standard/tests/file/bug30362.phpt (revision 26dfce7f)
1--TEST--
2Bug #30362 (stream_get_line() not working as documented)
3--FILE--
4<?php
5
6$resource = fopen(__DIR__.'/bug30362.txt', 'rb');
7
8for ($i = 0; ($i < 10) && !feof($resource); ++$i ) {
9    $a = "Y";
10    $line = stream_get_line($resource, 50, $a);
11    echo $line . "\n";
12}
13fclose($resource);
14
15?>
16--EXPECT--
17111
18111111111
19111111111
20111111111
21111111111
22111111111
23111111111
24111111111
25111111111
26111111111
27