<?php
$text = "А роза упала на лапу Азора";
$result = "Палиндром";
// унижаем, удаляем пробелы
//Проверяем строку
$halfLength = floor($length / 2);
for ($i = 0; $i <= $halfLength; $i++) {
echo "{$firstLetter} -- {$lastLetter}\n";
if ($firstLetter != $lastLetter) {
$result = "Не палиндром";
break;
}
}
echo $result;
PD9waHAKZXJyb3JfcmVwb3J0aW5nKC0xKTsKbWJfaW50ZXJuYWxfZW5jb2RpbmcoJ3V0Zi04Jyk7CgokdGV4dCA9ICLQkCDRgNC+0LfQsCDRg9C/0LDQu9CwINC90LAg0LvQsNC/0YMg0JDQt9C+0YDQsCI7CiRyZXN1bHQgPSAi0J/QsNC70LjQvdC00YDQvtC8IjsKLy8g0YPQvdC40LbQsNC10LwsINGD0LTQsNC70Y/QtdC8INC/0YDQvtCx0LXQu9GLCiR0ZXh0ID0gbWJfc3RydG9sb3dlcigkdGV4dCk7CiR3b3JkQXJyYXkgPSBleHBsb2RlKCcgJywgJHRleHQpOwokdGV4dCA9IGltcGxvZGUoJHdvcmRBcnJheSwgIiIpOwoKLy/Qn9GA0L7QstC10YDRj9C10Lwg0YHRgtGA0L7QutGDCiRsZW5ndGggPSBtYl9zdHJsZW4oJHRleHQpOwokaGFsZkxlbmd0aCA9IGZsb29yKCRsZW5ndGggLyAyKTsKCmZvciAoJGkgPSAwOyAkaSA8PSAkaGFsZkxlbmd0aDsgJGkrKykgewogICAgJGZpcnN0TGV0dGVyID0gbWJfc3Vic3RyKCR0ZXh0LCAkaSwgMSk7CiAgICAkbGFzdExldHRlciA9IG1iX3N1YnN0cigkdGV4dCwgLSRpLTEsIDEpOwogICAgZWNobyAieyRmaXJzdExldHRlcn0gLS0geyRsYXN0TGV0dGVyfVxuIjsKICAgIGlmICgkZmlyc3RMZXR0ZXIgIT0gJGxhc3RMZXR0ZXIpIHsKICAgICAgICAkcmVzdWx0ID0gItCd0LUg0L/QsNC70LjQvdC00YDQvtC8IjsKICAgICAgICBicmVhazsKICAgIH0KfQoKZWNobyAkcmVzdWx0Ow==