<?php

error_reporting(-1);
mb_internal_encoding('utf-8');

$text="Аргентина манит негра";
$result="палиндром";

$text=str_replace(" ","",$text);
$text =mb_strtolower($text);

$lenght=mb_strlen($text);
echo"{$lenght}\n";
$halfText= floor($lenght/ 2);

for($i=0; $i<=$halfText; $i++) {
	$y[]=mb_substr($text,$i,1);
}
	$y=implode($y);
for($i=200; $i>=$halfText; $i--) {
	$x[]=mb_substr($text,$i,1);
}
	$x=implode($x);
if ($x==$y) {
	echo $result;
}
else {
	echo"niet";
}