sde, it occurred to me that you only have to intercept stdin to add user input functionality. I found this in a quick search:
Code:
<?php
function read($len = 255) {
$fp=fopen('php://stdin', 'r');
$input=fgets($fp, $len);
fclose($fp);
return str_replace(array("\r", "\n"), array('', ''), $input);
}
echo("Whats your name? ");
$name = read();
echo("Hello $name!\n");
?>
The original link is:
PHP User Input Example
It's supposed to be cross platform.