- Notifications
You must be signed in to change notification settings - Fork8k
Closed
Description
Description
The following code:
<?php$file_stream =newSplFileObject(__FILE__,'rb');echo$file_stream;// line 4echo$file_stream;// line 5echo$file_stream;// line 6echo$file_stream;// line 7echo$file_stream;// line 8echo$file_stream;// line 9
Resulted in this output:
<?php$file_stream = new SplFileObject(__FILE__, 'rb');echo $file_stream; // line 4echo $file_stream; // line 5
But I expected this output instead:
<?php<?php<?php<?php<?php<?php
The issue is due to theerroneous fix ofbug 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