<?php
// палиндром
$text = 'А роза упала на лапу Азора';
$result = 'палиндром';
$halfLength = floor($length / 2);
for ($i = 0; $i <= $halfLength; $i++) {
if ($firstSymbol != $lastSymbol) {
$result = 'Не палиндром';
break;
}
}
echo "Результат: {$result}\n";
PD9waHAKCi8vINC/0LDQu9C40L3QtNGA0L7QvAoKZXJyb3JfcmVwb3J0aW5nKC0xKTsKbWJfaW50ZXJuYWxfZW5jb2RpbmcoJ3V0Zi04Jyk7CgokdGV4dCA9ICfQkCDRgNC+0LfQsCDRg9C/0LDQu9CwINC90LAg0LvQsNC/0YMg0JDQt9C+0YDQsCc7CiRyZXN1bHQgPSAn0L/QsNC70LjQvdC00YDQvtC8JzsKCiR0ZXh0ID0gbWJfc3RydG9sb3dlcigkdGV4dCk7CiR0ZXh0ID0gc3RyX3JlcGxhY2UoIiAiLCAiIiwgJHRleHQpOwoKCiRsZW5ndGggPSBtYl9zdHJsZW4oJHRleHQpOwokaGFsZkxlbmd0aCA9IGZsb29yKCRsZW5ndGggLyAyKTsKCmZvciAoJGkgPSAwOyAkaSA8PSAkaGFsZkxlbmd0aDsgJGkrKykgewoJJGZpcnN0U3ltYm9sID0gbWJfc3Vic3RyKCR0ZXh0LCRpLDEpOwoJJGxhc3RTeW1ib2wgPSBtYl9zdWJzdHIoJHRleHQsLSgkaSsxKSwxKTsKCWlmICgkZmlyc3RTeW1ib2wgIT0gJGxhc3RTeW1ib2wpIHsKCQkkcmVzdWx0ID0gJ9Cd0LUg0L/QsNC70LjQvdC00YDQvtC8JzsKCQlicmVhazsKCX0KfQoKZWNobyAi0KDQtdC30YPQu9GM0YLQsNGCOiB7JHJlc3VsdH1cbiI7Cg==