When I was searching for how to read a single character from the console, I found this article, but I don't think that this solution works for Windows. So my querstion is, how to accomplish a readline()
for a single character that works without pressing enter/return after every single character?
I tried stream_get_line(STDIN, 1)
, but this function neither returns after I typing the first character nor returns only one character after pressing enter/return.