I have a PHP script that run on console.
while(1) {
doStuff();
sleep(2);
}
I need to accept input from the console. I don't want loop stop each time and wait for me to input some text.
What i want is while loop continue as normal, if i type something in console, php script able to read that text and update some variable.
Can this be done ?