<?php
$text = "А роза упала на лапу Азора";
$resultTrue = "палиндром";
$resultFalse = "не палиндром";
$halfLength = floor($length/ 2);
for ($i = 1; $i <= $halfLength; $i++) {
if ( $firstLetter != $lastLetter) {
echo "$resultFalse\n";
break;
} else {
echo "$resultTrue\n";
break;
}
}
PD9waHAKCmVycm9yX3JlcG9ydGluZygtMSk7Cm1iX2ludGVybmFsX2VuY29kaW5nKCd1dGYtOCcpOwoKJHRleHQgPSAi0JAg0YDQvtC30LAg0YPQv9Cw0LvQsCDQvdCwINC70LDQv9GDINCQ0LfQvtGA0LAiOwokcmVzdWx0VHJ1ZSA9ICLQv9Cw0LvQuNC90LTRgNC+0LwiOwokcmVzdWx0RmFsc2UgPSAi0L3QtSDQv9Cw0LvQuNC90LTRgNC+0LwiOwoKJHRleHQgPSBzdHJfcmVwbGFjZSgiICIsICIiLCAkdGV4dCk7CiR0ZXh0ID0gbWJfc3RydG9sb3dlcigkdGV4dCk7CgoKJGxlbmd0aCA9IG1iX3N0cmxlbigkdGV4dCk7CiRoYWxmTGVuZ3RoID0gZmxvb3IoJGxlbmd0aC8gMik7Cgpmb3IgKCRpID0gMTsgJGkgPD0gJGhhbGZMZW5ndGg7ICRpKyspIHsKICAgICRmaXJzdExldHRlciA9IG1iX3N1YnN0cigkdGV4dCwgJGksIDEpOwogICAgJGxhc3RMZXR0ZXIgPSBtYl9zdWJzdHIoJHRleHQsIC0kaSwgMSk7CiAgICAKICAgIGlmICggJGZpcnN0TGV0dGVyICE9ICRsYXN0TGV0dGVyKSB7CiAgICAgIGVjaG8gIiRyZXN1bHRGYWxzZVxuIjsKICAgICAgIGJyZWFrOwogICAgfSBlbHNlIHsKICAgIAllY2hvICIkcmVzdWx0VHJ1ZVxuIjsKICAgIAlicmVhazsKICAgIH0KfQo=