<?php
$text = "А роза упала на лапу Азора";
$result = "";
$halfLengthText = floor($lengthText / 2);
for ($i = 0; $i <= $halfLengthText; $i++) {
$substrText1 = mb_substr ($textNoSpace, $i, 1); $substrText2 = mb_substr ($textNoSpace, $lengthText-1-$i, 1);
if ($substrText1 == $substrText2) {
$result = "палиндром";
} else {
$result = "не палиндром";
break;
}
}
echo "Итого: Это {$result}\n";
// your code goes here
PD9waHAKCmVycm9yX3JlcG9ydGluZyAoLTEpOwptYl9pbnRlcm5hbF9lbmNvZGluZygndXRmLTgnKTsKCiR0ZXh0ID0gItCQINGA0L7Qt9CwINGD0L/QsNC70LAg0L3QsCDQu9Cw0L/RgyDQkNC30L7RgNCwIjsKJHJlc3VsdCA9ICIiOwoKJHRleHRMb3dlciA9IG1iX3N0cnRvbG93ZXIgKCR0ZXh0KTsKJHRleHROb1NwYWNlID0gc3RyX3JlcGxhY2UoIiAiLCAiIiwgJHRleHRMb3dlcik7CgokbGVuZ3RoVGV4dCA9IG1iX3N0cmxlbigkdGV4dE5vU3BhY2UpOwokaGFsZkxlbmd0aFRleHQgPSBmbG9vcigkbGVuZ3RoVGV4dCAvIDIpOwoKZm9yICgkaSA9IDA7ICRpIDw9ICRoYWxmTGVuZ3RoVGV4dDsgJGkrKykgewogICAkc3Vic3RyVGV4dDEgPSBtYl9zdWJzdHIgKCR0ZXh0Tm9TcGFjZSwgJGksIDEpOwogICAkc3Vic3RyVGV4dDIgPSBtYl9zdWJzdHIgKCR0ZXh0Tm9TcGFjZSwgJGxlbmd0aFRleHQtMS0kaSwgMSk7CiAKIGlmICgkc3Vic3RyVGV4dDEgPT0gJHN1YnN0clRleHQyKSB7CiAgICAkcmVzdWx0ID0gItC/0LDQu9C40L3QtNGA0L7QvCI7CiB9IGVsc2UgewogICAgJHJlc3VsdCA9ICLQvdC1INC/0LDQu9C40L3QtNGA0L7QvCI7CiBicmVhazsKICAgfQp9CgplY2hvICLQmNGC0L7Qs9C+OiDQrdGC0L4geyRyZXN1bHR9XG4iOwovLyB5b3VyIGNvZGUgZ29lcyBoZXJl