Description
The following code:
<?php
$file_stream = new SplFileObject(__FILE__, 'rb');
echo $file_stream; // line 4
echo $file_stream; // line 5
echo $file_stream; // line 6
echo $file_stream; // line 7
echo $file_stream; // line 8
echo $file_stream; // line 9
Resulted in this output:
<?php
$file_stream = new SplFileObject(__FILE__, 'rb');
echo $file_stream; // line 4
echo $file_stream; // line 5
But I expected this output instead:
<?php
<?php
<?php
<?php
<?php
<?php
See https://3v4l.org/gF4tm.
The issue is due to the erroneous fix of bug 77024, where ::__toString() is now an alias of ::fgets() what appears to be strange.
This issue has been discovered by @derickr.
PHP Version
PHP 8.0
Operating System
any
Description
The following code:
Resulted in this output:
But I expected this output instead:
See https://3v4l.org/gF4tm.
The issue is due to the erroneous fix of bug 77024, where
::__toString()is now an alias of::fgets()what appears to be strange.This issue has been discovered by @derickr.
PHP Version
PHP 8.0
Operating System
any