go to bug id or search bugs for
I noticed the following behavior changed when using fread with stdin in PHP 7.2. I think the new behavior is correct based on the manual page for fread, but I didn't see it noted as a change in the release notes unless I missed it.
When running the below script in CLI, enter the text "abc" and press enter.
In PHP 7.1, the script immediately exits and prints the line you entered.
In PHP 7.2, the script prompts you for another line of text. You have to press Control-D to exit out of it, and then all lines are printed.
echo fread(STDIN, 1000);
Add a Patch
Add a Pull Request
Maybe related to #75515?
Yes, looks to be similar.
Closing, as indeed fixed in PHP-7.2 branch