PHP basic script
<?php
echo "\nWhat's your name?\n";
$name = fgets(STDIN);
echo "\nHello,".$name."Nice to meet you!\n\n";
?>
Running the script from the CLI

<?php
echo "\nWhat's your name?\n";
$name = fgets(STDIN);
echo "\nHello,".$name."Nice to meet you!\n\n";
?>