I have tried setting stream_set_blocking(STDIN, false) but still requires ENTER.
Capturing the keypress without ENTER works via FFI where C functions like _getch(), _kbhit () , который присутствует в msvcrt.dll .
Код: Выделить всё
Подробнее здесь: [url]https://stackoverflow.com/questions/79645044/why-is-real-time-key-press-detection-does-not-work-in-windows-php-cli-without-h[/url]