Newline in PHP command line
You need to use double quotes:
echo($string."\r");
^ ^
single quoted strings do not honor ANY metacharacters, except the backslash itself.
You can concatenate the PHP_EOL
constant.
echo 'Hi, Im great!' . PHP_EOL;
echo 'And Handsome too' . PHP_EOL;
Use double quotes echo "next line\n";