<?php
$text = "А РОЗА УПАЛА НА ЛАПУ АЗОРА";
$result = 'Это палиндром';
$resultN = "Это не палиндром";
$halfLength = floor($length/ 2);
for ($i = 1; $i <= $halfLength; $i++) {
if ($symbol == $symbolRev) {
echo "$symbol\n";
} if ($i == $halfLength) {
echo $result;
break;
} elseif ($symbol != $symbolRev) {
echo "$resultN";
break;
}
}
PD9waHAKCmVycm9yX3JlcG9ydGluZygtMSk7Cm1iX2ludGVybmFsX2VuY29kaW5nKCd1dGYtOCcpOwoKCiR0ZXh0ID0gItCQINCg0J7Ql9CQINCj0J/QkNCb0JAg0J3QkCDQm9CQ0J/QoyDQkNCX0J7QoNCQIjsKJHJlc3VsdCA9ICfQrdGC0L4g0L/QsNC70LjQvdC00YDQvtC8JzsKJHJlc3VsdE4gPSAi0K3RgtC+INC90LUg0L/QsNC70LjQvdC00YDQvtC8IjsKCiR0ZXh0ID0gbWJfc3RydG9sb3dlcigkdGV4dCk7CiR0ZXh0ID0gc3RyX3JlcGxhY2UoJyAnLCAnJywgJHRleHQpOwoKJGxlbmd0aCA9IG1iX3N0cmxlbigkdGV4dCk7CiRoYWxmTGVuZ3RoID0gZmxvb3IoJGxlbmd0aC8gMik7Cgpmb3IgKCRpID0gMTsgJGkgPD0gJGhhbGZMZW5ndGg7ICRpKyspICB7Cgkkc3ltYm9sID0gbWJfc3Vic3RyKCR0ZXh0LCAkaS0xLCAxKTsKCSRzeW1ib2xSZXYgPSBtYl9zdWJzdHIoJHRleHQsIC0kaSwgMSk7CgkKCWlmICgkc3ltYm9sID09ICRzeW1ib2xSZXYpIHsKICAgZWNobyAiJHN5bWJvbFxuIjsKICAgCn0gaWYgKCRpID09ICRoYWxmTGVuZ3RoKSB7CiAgIGVjaG8gJHJlc3VsdDsKICAgYnJlYWs7Cn0gZWxzZWlmICgkc3ltYm9sICE9ICRzeW1ib2xSZXYpIHsKCWVjaG8gIiRyZXN1bHROIjsKCWJyZWFrOwp9Cn0=