I'm trying write simple script which will work from console, but I ran into a problem. Echo in my case does not work. But when I delete the line: readline ('Command:'), it starts working as expected, so I tried to replace echo with print_r, but that did not help. I launch a script from the Windows console.
<?php
while (true){
$input = readline('Command: ');
$input = strtolower($input);
echo $input; //don't work
switch ($input){
case 'stop':
exit(0);
break;
case '1':
echo 1; //don't work
break;
default:
echo 'Command ' . $input . ' not found.'; //don't work
}
}