<?php
$text = "а роза упала на лапу Азора";
$halflenght = floor ($lenght / 2);
for ($i = 0; $i <= $halflenght; $i++) {
echo "$symb1 $symb2 \n";
if ($symb1 <> $symb2) {
echo "не палиндром";
break;
}
}
echo "палиндром";
PD9waHAKZXJyb3JfcmVwb3J0aW5nKC0xKTsKbWJfaW50ZXJuYWxfZW5jb2RpbmcoJ3V0Zi04Jyk7CgokdGV4dCA9ICLQsCDRgNC+0LfQsCDRg9C/0LDQu9CwINC90LAg0LvQsNC/0YMg0JDQt9C+0YDQsCI7CiR0ZXh0ID0gbWJfc3RydG9sb3dlcigkdGV4dCk7CiR0ZXh0ID0gc3RyX3JlcGxhY2UoIiAiLCAiIiwgJHRleHQpOwoKJGxlbmdodCA9IG1iX3N0cmxlbigkdGV4dCk7CiRoYWxmbGVuZ2h0ID0gZmxvb3IgKCRsZW5naHQgLyAyKTsKCmZvciAoJGkgPSAwOyAkaSA8PSAkaGFsZmxlbmdodDsgJGkrKykgewoJCgkkc3ltYjEgPSBtYl9zdWJzdHIoJHRleHQsIDAsICRpKTsKCSRzeW1iMiA9IG1iX3N1YnN0cigkdGV4dCwgLSRpKTsKCQoJZWNobyAiJHN5bWIxICRzeW1iMiBcbiI7CgkJCglpZiAoJHN5bWIxIDw+ICRzeW1iMikgewoJCWVjaG8gItC90LUg0L/QsNC70LjQvdC00YDQvtC8IjsKCQlicmVhazsKCX0KCX0KCmVjaG8gItC/0LDQu9C40L3QtNGA0L7QvCI7