I have just upgraded from PHP 7.3.12 to PHP 7.4.0 (released today) on Windows.
This worked until just now:
<?php
$input = fgets(STDIN);
var_dump($input);
It now outputs:
bool(false)
It doesn't ask/allow for input at all anymore. It immediately returns a bool false.
I can't find any mention of any recent changes to fgets in either the changelog or the manual page.
What is wrong? What am I supposed to do? Is this a bug? Is it known? Has it been encountered by anyone else?
Also, if this is wrong somehow (in spite of working for so long, and in spite of me finding this code recommended online), what is the "real" way to accept user input/wait for Enter?
I have now downgraded back to 7.3.12 for the moment to fix this issue.
EDIT: Somebody has finally submitted a bug report for this. I sure hope it won't be ignored, as is so often the case in many FOSS projects: https://bugs.php.net/bug.php?id=78883