LINUX.ORG.RU

История изменений

Исправление MOPKOBKA, (текущая версия) :

Ну вот тебе полнейшее соответствие:

<?php
$A = "Gentoshnik";
$B = "MOPKOBKA";

while(true) {
  if(empty($sym = readline("Please, introduce yourself: ")) || $sym === ".") break;
  if($sym[0] == ",") {
    $sym = substr($sym, 1);
    $sym = $$sym;
  }
  echo "Hello, " . $sym . PHP_EOL;
}
$ php main.php
Please, introduce yourself: a
Hello, a
Please, introduce yourself: b
Hello, b
Please, introduce yourself: c
Hello, c
Please, introduce yourself: d
Hello, d
Please, introduce yourself: ,A
Hello, Gentoshnik
Please, introduce yourself: .
$ 

Исходная версия MOPKOBKA, :

Ну вот тебе полнейшее соответствие:

<?php
$A = "Gentoshnik";
$B = "MOPKOBKA";

while(true) {
  if(empty($sym = readline("Please, introduce yourself: ")) || $sym === ".") break;
  if($sym[0] == ",") {
    $sym = substr($sym, 1);
    $sym = $$sym;
  }
  echo "Hello, " . $sym . PHP_EOL;
}