<?php
$text = 'А роза упала на лапу Азора';
$result = "Палиндром!";
$letters1 = '';
$letters2 = '';
$halfLenght = floor($lenght / 2);
for ($i = 0; $i <= $halfLenght; $i ++){
$otherSide = $lenght - $i - 1;
$letters1 = $letters1 . $symbol1;
$letters2 = $letters2 . $symbol2;
if ($symbol1 == $symbol2){
} else {
break;
}
}
if ($letters1 == $letters2){
echo "$result";
} else {
echo "Это не палиндром";
}
PD9waHAKZXJyb3JfcmVwb3J0aW5nKC0xKTsKbWJfaW50ZXJuYWxfZW5jb2RpbmcoJ3V0Zi04Jyk7CiAKJHRleHQgPSAn0JAg0YDQvtC30LAg0YPQv9Cw0LvQsCDQvdCwINC70LDQv9GDINCQ0LfQvtGA0LAnOwokcmVzdWx0ID0gItCf0LDQu9C40L3QtNGA0L7QvCEiOwokbGV0dGVyczEgPSAnJzsKJGxldHRlcnMyID0gJyc7CiAKJHRleHQgPSBtYl9zdHJ0b2xvd2VyKCR0ZXh0KTsKJHRleHQgPSBzdHJfcmVwbGFjZSgnICcsICcnLCAkdGV4dCk7CiAKJGxlbmdodCA9IG1iX3N0cmxlbigkdGV4dCk7CiRoYWxmTGVuZ2h0ID0gZmxvb3IoJGxlbmdodCAvIDIpOwogCmZvciAoJGkgPSAwOyAkaSA8PSAkaGFsZkxlbmdodDsgJGkgKyspewoJJHN5bWJvbDEgPSBtYl9zdWJzdHIoJHRleHQsICRpLCAxKTsKCSRvdGhlclNpZGUgPSAkbGVuZ2h0IC0gJGkgLSAxOwoJJHN5bWJvbDIgPSBtYl9zdWJzdHIoJHRleHQsICRvdGhlclNpZGUsIDEpOwoJJGxldHRlcnMxID0gJGxldHRlcnMxIC4gJHN5bWJvbDE7CgkkbGV0dGVyczIgPSAkbGV0dGVyczIgLiAkc3ltYm9sMjsKCWlmICgkc3ltYm9sMSA9PSAkc3ltYm9sMil7CgkJCX0gZWxzZSB7CgkJYnJlYWs7Cgl9Cn0KIAppZiAoJGxldHRlcnMxID09ICRsZXR0ZXJzMil7CgllY2hvICIkcmVzdWx0IjsKfSBlbHNlIHsKCWVjaG8gItCt0YLQviDQvdC1INC/0LDQu9C40L3QtNGA0L7QvCI7Cn0=