<?php
 
error_reporting(-1);
mb_internal_encoding('utf-8');
 
$text = "Аргентина манит негра";
$resultTrue = "Результат - палиндром\n";
$resultFalse = "Результат - не палиндром\n";
 
$text = mb_strtolower($text);
$text1 = str_replace(" ","",$text);
 
function strrev_enc($text2)
{
    $text2 = iconv('utf-8', 'windows-1251', $text2);
    $text2 = strrev($text2);
    $text2 = iconv('windows-1251', 'utf-8', $text2);
    return $text2;
}
 
$text2 = strrev_enc($text1);
 
echo "Строка - {$text1}, инвертированная строка - {$text2}.\n";
 
if ($text1 == $text2) {
    echo $resultTrue;
} else {
    echo $resultFalse;
}