<?php
$text = "А роза упала на лапу Азора" ;
$result = "палиндром" ;
$halfLength = floor ( $length / 2 ) ;
for ( $i = 0 ; $i <= halfLength; $i ++ ) {
$beginningLine = mb_substr ( $text , $halfLength ) ; $endingLine = mb_substr ( $text , - $halfLength ) ; }
if ( $beginningLine == $endingLine ) {
echo " Результат: {$result} \n " ;
}
PD9waHAKCmVycm9yX3JlcG9ydGluZygtMSk7CgokdGV4dCA9ICLQkCDRgNC+0LfQsCDRg9C/0LDQu9CwINC90LAg0LvQsNC/0YMg0JDQt9C+0YDQsCI7CiRyZXN1bHQgPSAi0L/QsNC70LjQvdC00YDQvtC8IjsKCiR0ZXh0ID0gbWJfc3RydG9sb3dlcigkdGV4dCk7CnN0cl9yZXBsYWNlKCIgIiwiIiwkdGV4dCk7CgokbGVuZ3RoID0gbWJfc3RybGVuKCR0ZXh0KTsKJGhhbGZMZW5ndGggPSBmbG9vcigkbGVuZ3RoLyAyKTsKCmZvciAoJGkgPSAwOyAkaSA8PSBoYWxmTGVuZ3RoOyAkaSsrKSB7CgkkYmVnaW5uaW5nTGluZSA9IG1iX3N1YnN0cigkdGV4dCwgJGhhbGZMZW5ndGgpOwoJJGVuZGluZ0xpbmUgPSBtYl9zdWJzdHIoJHRleHQsIC0kaGFsZkxlbmd0aCk7Cn0JCglpZiAoJGJlZ2lubmluZ0xpbmUgPT0gJGVuZGluZ0xpbmUpIHsKCQllY2hvICIg0KDQtdC30YPQu9GM0YLQsNGCOiB7JHJlc3VsdH1cbiI7CQkKCX0K