User input in php command line
Ever wondered how to capture the user input when writing php command line scripts ?
fwrite(STDOUT, "$msg: ");
$varin = trim(fgets(STDIN));
The function above is being used by me in certain command line scripts, where I need user responses.