Bug #75526 [Com]: fread behavior change in 7.2
| From: | ryan dot brothers at gmail dot com | Date: | Tue, 14 Nov 2017 19:02:12 +0000 |
| Subject: | Bug #75526 [Com]: fread behavior change in 7.2 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-212588@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=75526&edit=1
ID: 75526
Comment by: ryan dot brothers at gmail dot com
Reported by: ryan dot brothers at gmail dot com
Summary: fread behavior change in 7.2
Status: Open
Type: Bug
Package: Streams related
Operating System: Linux
PHP Version: 7.2.0RC6
Block user comment: N
Private report: N
New Comment:
Yes, looks to be similar.
Previous Comments:
------------------------------------------------------------------------
[2017-11-14 18:53:47] kelunik@php.net
Maybe related to #75515?
------------------------------------------------------------------------
[2017-11-14 18:43:49] ryan dot brothers at gmail dot com
Description:
------------
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.
Test script:
---------------
<?php
echo fread(STDIN, 1000);
exit;
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=75526&edit=1