foreach(range(7, 1) as $i) {
echo "Осталось {$i} секунд";
switch($i) {
case($i >= 2 && $i <=4):
echo "ы";
break;
case($i == 1):
echo "а";
}
echo "...", PHP_EOL;
sleep(1);
}
echo "Готово!";
str = "Hello everybody, my name is alex"
str = str.split(", ")
str = str[0] + " (" + str[1].split.map(&:capitalize).join(" ") + ")"
https://ideone.com/4vFxFL